From 92d7ccf331518eb858411af790782aca18d93dc0 Mon Sep 17 00:00:00 2001 From: Oleg Blokhin Date: Wed, 21 May 2014 17:28:11 +0400 Subject: [PATCH] Add support of --folder paramter for cron. Before this changes crontab from directories (except native applications) was ignored --- git | 0 gluon/newcron.py | 4 ++-- gluon/widget.py | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 git diff --git a/git b/git new file mode 100644 index 00000000..e69de29b diff --git a/gluon/newcron.py b/gluon/newcron.py index 7245507c..47891342 100644 --- a/gluon/newcron.py +++ b/gluon/newcron.py @@ -320,8 +320,8 @@ def crondance(applications_parent, ctype='soft', startup=False, apps=None): w2p_path = fileutils.abspath('web2py.py', gluon=True) if os.path.exists(w2p_path): commands.append(w2p_path) - if global_settings.applications_parent != global_settings.gluon_parent: - commands.extend(('-f', global_settings.applications_parent)) + if applications_parent != global_settings.gluon_parent: + commands.extend(('-f', applications_parent)) citems = [(k in task and not v in task[k]) for k, v in checks] task_min = task.get('min', []) if not task: diff --git a/gluon/widget.py b/gluon/widget.py index 770e3aed..cf885ae6 100644 --- a/gluon/widget.py +++ b/gluon/widget.py @@ -225,8 +225,8 @@ class web2pyDialog(object): text=str(ProgramVersion + "\n" + ProgramAuthor), font=('Helvetica', 11), justify=Tkinter.CENTER, foreground='#195866', background=bg_color, - height=3).pack( side='top', - fill='both', + height=3).pack( side='top', + fill='both', expand='yes') self.bannerarea.after(1000, self.update_canvas) @@ -246,7 +246,7 @@ class web2pyDialog(object): [('0.0.0.0', 'Public')] for ip, legend in ips: self.ips[ip] = Tkinter.Radiobutton( - self.root, bg=bg_color, highlightthickness=0, + self.root, bg=bg_color, highlightthickness=0, selectcolor='light grey', width=30, anchor=Tkinter.W, text='%s (%s)' % (legend, ip), justify=Tkinter.LEFT, @@ -1119,6 +1119,8 @@ def start(cron=True): # ## if -S start interactive shell (also no cron) if options.shell: + if options.folder: + os.chdir(options.folder) if not options.args is None: sys.argv[:] = options.args run(options.shell, plain=options.plain, bpython=options.bpython,