[Checkins] SVN: z3c.recipe.usercrontab/trunk/ Fix bug where UserCrontabs with empty readcrontab and writecrontab constructor arguments where broken

Jasper Spaans jspaans at thehealthagency.com
Wed Feb 25 16:34:56 EST 2009


Log message for revision 97273:
  Fix bug where UserCrontabs with empty readcrontab and writecrontab constructor arguments where broken

Changed:
  U   z3c.recipe.usercrontab/trunk/CHANGES.txt
  U   z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py

-=-
Modified: z3c.recipe.usercrontab/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.usercrontab/trunk/CHANGES.txt	2009-02-25 18:58:12 UTC (rev 97272)
+++ z3c.recipe.usercrontab/trunk/CHANGES.txt	2009-02-25 21:34:56 UTC (rev 97273)
@@ -4,7 +4,8 @@
 0.4 (unreleased)
 ================
 
-* ...
+* Fix bug where UserCrontabs with empty readcrontab and writecrontab
+  constructor arguments where broken
 
 0.3 (2008-02-23)
 ================

Modified: z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py
===================================================================
--- z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py	2009-02-25 18:58:12 UTC (rev 97272)
+++ z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py	2009-02-25 21:34:56 UTC (rev 97273)
@@ -61,10 +61,9 @@
     username = None
     crontab = []
 
-    def __init__(self, readcrontab=defaultreadcrontab,
-                       writecrontab=defaultwritecrontab):
-        self.readcrontab = readcrontab
-        self.writecrontab = writecrontab
+    def __init__(self, readcrontab=None, writecrontab=None):
+        self.readcrontab = readcrontab or defaultreadcrontab
+        self.writecrontab = writecrontab or defaultwritecrontab
 
     def read_crontab(self):
         self.crontab = [ l.strip("\n") for l in



More information about the Checkins mailing list