From a7defed64cc0a2705b2c4f918f5de2b9c4f6a5e5 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 24 Nov 2013 20:33:31 -0600 Subject: [PATCH] no more Tkinter is not necessary --- VERSION | 2 +- gluon/widget.py | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/VERSION b/VERSION index 8d8ec349..54015bbe 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.7.4-stable+timestamp.2013.11.24.09.43.16 +Version 2.7.4-stable+timestamp.2013.11.24.20.32.35 diff --git a/gluon/widget.py b/gluon/widget.py index 76c59754..2a8ddc98 100644 --- a/gluon/widget.py +++ b/gluon/widget.py @@ -1153,22 +1153,20 @@ def start(cron=True): root = None - if not options.nogui: + if not options.nogui and options.password=='': try: import Tkinter havetk = True + try: + root = Tkinter.Tk() + except: + pass except (ImportError, OSError): logger.warn( 'GUI not available because Tk library is not installed') havetk = False options.nogui = True - if options.password == '' and havetk or options.taskbar and havetk: - try: - root = Tkinter.Tk() - except: - pass - if root: root.focus_force()