From 87a7112c0750ac7f7ae6dff14c20fcaddc259932 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 7 Dec 2010 19:32:15 +0100 Subject: [PATCH] symlinks, use webbrowser --- pandora_client/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_client/__init__.py b/pandora_client/__init__.py index 17896eb..b6540c2 100644 --- a/pandora_client/__init__.py +++ b/pandora_client/__init__.py @@ -10,6 +10,7 @@ import json import sqlite3 import time import shutil +import webbrowser from firefogg import Firefogg import ox @@ -137,7 +138,7 @@ class Client(object): path = self._config['volumes'][name] path = os.path.normpath(path) files = [] - for dirpath, dirnames, filenames in os.walk(path): + for dirpath, dirnames, filenames in os.walk(path, followlinks=True): if isinstance(dirpath, str): dirpath = dirpath.decode('utf-8') if filenames: @@ -289,7 +290,7 @@ class API(object): if e.code >= 500: with open('/tmp/error.html', 'w') as f: f.write(e.read()) - os.system('firefox /tmp/error.html') + webbrowser.open_new_tab('/tmp/error.html') result = e.read() try: