diff --git a/tryton/common/common.py b/tryton/common/common.py index e82fd9299c..b38eae217e 100644 --- a/tryton/common/common.py +++ b/tryton/common/common.py @@ -91,8 +91,10 @@ def tipoftheday(parent=None): tip_file = False if lang: tip_file = os.path.join(DATA_DIR, 'tipoftheday.'+lang+'.txt') - if not tip_file: + if not os.path.isfile(tip_file): tip_file = os.path.join(DATA_DIR, 'tipoftheday.txt') + if not os.path.isfile(tip_file): + return tips = file(tip_file).read().split('---') tip = tips[self.number % len(tips)] del tips diff --git a/tryton/tryton.py b/tryton/tryton.py index e75b57cffc..6348dce2be 100644 --- a/tryton/tryton.py +++ b/tryton/tryton.py @@ -83,7 +83,7 @@ class TrytonClient(object): def run(self): main = Main() if CONFIG['tip.autostart']: - pass + main.sig_tips() else: main.sig_login() gtk.main()