From 517dfd1d0717a55f98ff0d5efd91c5f5cdf28a82 Mon Sep 17 00:00:00 2001 From: pierre Date: Tue, 29 Jan 2013 00:08:03 +0100 Subject: [PATCH] ... --- functions.py | 7 ++++--- iramuteq.desktop | 8 -------- iramuteq.py | 7 +++---- 3 files changed, 7 insertions(+), 15 deletions(-) delete mode 100644 iramuteq.desktop diff --git a/functions.py b/functions.py index 8f9cf41..82b08bd 100644 --- a/functions.py +++ b/functions.py @@ -546,9 +546,10 @@ def check_Rresult(parent, pid) : if error[1] is None : error[1] = 'None' parent.Rerror = '\n'.join([str(pid.returncode), '\n'.join(error)]) - #try : - #raise Exception('\n'.join([u'Erreur R', '\n'.join(error[1:])])) - BugReport(parent) + try : + raise Exception('\n'.join([u'Erreur R', '\n'.join(error[1:])])) + except : + BugReport(parent) return False #except : # BugReport(parent) diff --git a/iramuteq.desktop b/iramuteq.desktop deleted file mode 100644 index 36f9dce..0000000 --- a/iramuteq.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Version=0.0.1 -Type=Application -Name=IRaMuTeQ -Exec=iramuteq -Terminal=false -Categories=Education;Science; -Icon=/usr/share/icons/iraicone.png diff --git a/iramuteq.py b/iramuteq.py index af6c521..d3ae6f3 100644 --- a/iramuteq.py +++ b/iramuteq.py @@ -124,16 +124,15 @@ CreateIraDirectory(UserConfigPath, AppliPath) #fichiers log pour windows (py2exe) log = logging.getLogger('iramuteq') fh = logging.FileHandler(os.path.join(UserConfigPath,'stdout.log')) -ch = logging.StreamHandler() formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') -ch.setFormatter(formatter) fh.setFormatter(formatter) log.addHandler(fh) -if sys.platform != 'win32' or sys.platform != 'darwin': +if sys.platform != 'win32' and sys.platform != 'darwin': + ch = logging.StreamHandler() + ch.setFormatter(formatter) log.addHandler(ch) log.setLevel(logging.INFO) - class writer(object): def write(self, data): if data.strip() != '' : -- 2.7.4