can't write file crontab to a user crontab

Bug #1412316 reported by wst
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-crontab
Fix Released
High
Martin Owens

Bug Description

Code which raises "AttributeError: can't set attribute" error:
from crontab import CronTab
cron = CronTab(tabfile='filecron.tab')
cron.write_to_user('bob')

Revision history for this message
wst (wistful) wrote :

Patch contains user's setter.

Revision history for this message
Martin Owens (doctormo) wrote :

I've fixed the issue in 1.9.2 (released) and added a test case to catch anything next time. Thank you for the report.

Changed in python-crontab:
assignee: nobody → Martin Owens (doctormo)
importance: Undecided → High
status: New → Fix Released
Revision history for this message
Martin Owens (doctormo) wrote :

I just noticed the patch, we must have been working on it at the same time. The proposed code would actually break the user support as it stands because __init__ and user_opt interact with the raw user value.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.