You are right.
On Apr 22, 4:14 pm, howesc <[email protected]> wrote: > in newcron.py line 242 the code allows an empty string to be added to > the lines array, that parsecronline() returns None for. > > perhaps line 242 should be changed from: > lines = [x.strip() for x in cronlines if not > x.strip().startswith('#')] > > to something like: > lines = [x.strip() for x in cronlines if not x.strip().startswith('#') > and not x.strip() == ''] > > On Apr 21, 6:59 pm, mdipierro <[email protected]> wrote: > > > this helps debug the problem. I will look more into it tomorrow. > > > On Apr 21, 7:04 pm, howesc <[email protected]> wrote: > > > > Hello, > > > > in 1.77.3, the following crontab file fails: > > > > ====== > > > #crontab > > > > #add > > > #0-59/1 * * * * www-data cd /opt/web2py/ && python web2py.py -C -D 1>> > > > /tmp/cron.output 2>&1 > > > > #to /etc/crontab and restart cron for this to take effect > > > > #run process every hour, at 5 past the hour > > > 5 * * * * root *processstats/process > > > ===== > > > > with the following traceback: > > > > web2py Enterprise Web Framework > > > Created by Massimo Di Pierro, Copyright 2007-2010 > > > Version 1.77.3 (2010-04-20 02:48:54) > > > Database drivers available: SQLite3, PostgreSQL > > > Starting hardcron... > > > Traceback (most recent call last): > > > File "web2py.py", line 20, in <module> > > > gluon.widget.start(cron=True) > > > File "/Users/cfhowes/linuxhome/clients/tenthrow/source/trunk/src/ > > > tenthrow/opt/web2py/gluon/widget.py", line 779, in start > > > newcron.hardcron(os.getcwd()).start() > > > File "/Users/cfhowes/linuxhome/clients/tenthrow/source/trunk/src/ > > > tenthrow/opt/web2py/gluon/newcron.py", line 40, in __init__ > > > crondance(self.path, 'hard', startup=True) > > > File "/Users/cfhowes/linuxhome/clients/tenthrow/source/trunk/src/ > > > tenthrow/opt/web2py/gluon/newcron.py", line 252, in crondance > > > citems = [(k in task and not v in task[k]) for k,v in checks] > > > TypeError: argument of type 'NoneType' is not iterable > > > > but, if i put a comment character on the 2 blank lines in my crontab > > > it works just fine. > > > > The file as above worked fine in older versions of web2py (though i > > > admit it's been a while since this project was upgraded) > > > > Thanks, > > > > Christian > > > > -- > > > Subscription > > > settings:http://groups.google.com/group/web2py/subscribe?hl=en

