Merge lp://qastaging/~pyepye/python-crontab/fix-system-cron-parsing into lp://qastaging/~doctormo/python-crontab/trunk
Proposed by
Alan Wong
Status: | Merged |
---|---|
Merged at revision: | 113 |
Proposed branch: | lp://qastaging/~pyepye/python-crontab/fix-system-cron-parsing |
Merge into: | lp://qastaging/~doctormo/python-crontab/trunk |
Diff against target: |
36 lines (+12/-3) 2 files modified
crontab.py (+5/-3) tests/test_system_cron.py (+7/-0) |
To merge this branch: | bzr merge lp://qastaging/~pyepye/python-crontab/fix-system-cron-parsing |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Owens | code | Approve | |
Review via email:
|
Description of the change
The system cron parsing code path expects that the sixth component of a crontab line is composed of <user cmd>. In the off chance that a comment has six components, the forceful assignment to the (user, cmd) tuple throws an exception. This fix checks the array length prior to assignment.
To post a comment you must log in.
The code looks good and the test suite is great. I shortened the number of lines, hopefully this won't be any problem (I've tested various things)
Thanks for the contribution! you rock.