symlinks, use webbrowser

This commit is contained in:
j 2010-12-07 19:32:15 +01:00
parent 41fb233fb6
commit 87a7112c07
1 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@ import json
import sqlite3 import sqlite3
import time import time
import shutil import shutil
import webbrowser
from firefogg import Firefogg from firefogg import Firefogg
import ox import ox
@ -137,7 +138,7 @@ class Client(object):
path = self._config['volumes'][name] path = self._config['volumes'][name]
path = os.path.normpath(path) path = os.path.normpath(path)
files = [] files = []
for dirpath, dirnames, filenames in os.walk(path): for dirpath, dirnames, filenames in os.walk(path, followlinks=True):
if isinstance(dirpath, str): if isinstance(dirpath, str):
dirpath = dirpath.decode('utf-8') dirpath = dirpath.decode('utf-8')
if filenames: if filenames:
@ -289,7 +290,7 @@ class API(object):
if e.code >= 500: if e.code >= 500:
with open('/tmp/error.html', 'w') as f: with open('/tmp/error.html', 'w') as f:
f.write(e.read()) f.write(e.read())
os.system('firefox /tmp/error.html') webbrowser.open_new_tab('/tmp/error.html')
result = e.read() result = e.read()
try: try: