[Checkins] SVN: z3c.recipe.usercrontab/trunk/ Append and prepend less white space per cron item, so you do not get
Maurits van Rees
m.van.rees at zestsoftware.nl
Mon Nov 8 12:10:47 EST 2010
Log message for revision 118291:
Append and prepend less white space per cron item, so you do not get
increasing extra white space everytime you run bin/buildout.
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 2010-11-08 16:32:40 UTC (rev 118290)
+++ z3c.recipe.usercrontab/trunk/CHANGES.txt 2010-11-08 17:10:47 UTC (rev 118291)
@@ -4,7 +4,9 @@
1.1 (unreleased)
----------------
-- Nothing changed yet.
+- Append and prepend less white space per cron item, so you do not get
+ increasing extra white space everytime you run bin/buildout.
+ [maurits]
1.0 (2009-11-10)
Modified: z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py
===================================================================
--- z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py 2010-11-08 16:32:40 UTC (rev 118290)
+++ z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py 2010-11-08 17:10:47 UTC (rev 118291)
@@ -89,8 +89,13 @@
# But preferably in our existing location.
self.crontab[start:end] = []
inject_at = start
+ # There is some white space already, so we only insert
+ # entry and markers.
+ to_inject = [self.prepend, entry, self.append]
+ else:
+ # Insert entry, markers, and white space
+ to_inject = ['', self.prepend, entry, self.append]
- to_inject = ['', self.prepend, entry, self.append, '']
if inject_at == -1:
# [-1:-1] would inject before the last item...
self.crontab += to_inject
More information about the checkins
mailing list