From 0926e09cbfbd5c0d1bc654059a64924364d2b332 Mon Sep 17 00:00:00 2001 From: Pierre Ratinaud Date: Wed, 19 Nov 2014 16:20:38 +0100 Subject: [PATCH] ... --- PrintRScript.py | 2 +- tree.py | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/PrintRScript.py b/PrintRScript.py index 8e54bf4..037c559 100644 --- a/PrintRScript.py +++ b/PrintRScript.py @@ -1210,6 +1210,6 @@ class TgenSpecScript(PrintRScript): colnames(result) <- colnames(tgen) row.names(result) <- rownames(tgen) write.table(result, file = "%s", sep='\\t', col.names = NA) - """ % self.pathout['tgenspec.csv'] + """ % ffr(self.pathout['tgenspec.csv']) self.add(txt) diff --git a/tree.py b/tree.py index 11de21b..5dd8365 100644 --- a/tree.py +++ b/tree.py @@ -11,7 +11,7 @@ import logging from openanalyse import OpenAnalyse from corpus import Corpus, copycorpus from tableau import Tableau, copymatrix -from functions import DoConf, GetTxtProfile, TGen +from functions import DoConf, GetTxtProfile, TGen, BugReport from profile_segment import ProfileSegment, ProfilType from search_tools import SearchFrame from dialog import PrefSimpleFile, PrefExport @@ -1030,12 +1030,19 @@ class LeftTree(CT.CustomTreeCtrl): elif pydata['uuid'] in ['textroot', 'matroot'] : pass else : - busy = wx.BusyInfo(_("Please wait..."), self.parent) - wx.SafeYield() - OpenAnalyse(self.parent, pydata) - del busy - self.SetItemBold(item, True) - self.OnSelChanged(pydata = pydata) + if os.path.exists(pydata['ira']) : + busy = wx.BusyInfo(_("Please wait..."), self.parent) + wx.SafeYield() + try : + OpenAnalyse(self.parent, pydata) + del busy + self.SetItemBold(item, True) + self.OnSelChanged(pydata = pydata) + except : + del busy + BugReport(self.ira) + else : + wx.MessageBox(_(u"This file does not exist : %s" % pydata['ira']).decode('utf8'), 'Information', wx.ICON_EXCLAMATION | wx.STAY_ON_TOP ) #if item and (flags & CT.TREE_HITTEST_ONITEMLABEL): # if self.GetAGWWindowStyleFlag() & CT.TR_EDIT_LABELS: # self.log.info("OnLeftDClick: %s (manually starting label edit)"% self.GetItemText(item) + "\n") -- 2.7.4