[Checkins] SVN: z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/__init__.py pep8
Reinout van Rees
reinout at vanrees.org
Mon Jun 15 06:53:36 EDT 2009
Log message for revision 100967:
pep8
Changed:
U z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/__init__.py
-=-
Modified: z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/__init__.py
===================================================================
--- z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/__init__.py 2009-06-15 10:41:15 UTC (rev 100966)
+++ z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/__init__.py 2009-06-15 10:53:35 UTC (rev 100967)
@@ -11,7 +11,9 @@
import logging
from z3c.recipe.usercrontab.usercrontab import UserCrontabManager
+
class UserCrontab:
+
def __init__(self, buildout, name, options):
self.options = options
@@ -20,8 +22,9 @@
writecrontab = self.options.get('writecrontab', None)
self.crontab = UserCrontabManager(readcrontab, writecrontab)
- self.env = { 'WARNING' :
- 'The entries below were generated by buildout, do not modify' }
+ self.env = {
+ 'WARNING':
+ 'The entries below were generated by buildout, do not modify'}
def install(self):
crontab = self.crontab
@@ -35,6 +38,7 @@
def update(self):
pass
+
def uninstall_usercrontab(name, options):
readcrontab = options.get('readcrontab', None)
writecrontab = options.get('writecrontab', None)
@@ -43,10 +47,14 @@
crontab.read_crontab()
nuked = crontab.del_entry(options['entry'])
if nuked==0:
- logging.getLogger(name).warning("WARNING: Did not find a crontab-entry during uninstall; "
- "please check manually if everything was removed correctly")
+ logging.getLogger(name).warning(
+ "WARNING: Did not find a crontab-entry during uninstall; "
+ "please check manually if everything was removed correctly")
elif nuked > 1:
- logging.getLogger(name).error("FATAL ERROR: Found more than one matching crontab-entry during uninstall; "
- "please resolve manually.\nMatched lines: %s" % (options['entry']))
- raise RuntimeError("Found more than one matching crontab-entry during uninstall")
+ logging.getLogger(name).error(
+ "FATAL ERROR: Found more than one matching crontab-entry during "
+ "uninstall; please resolve manually.\nMatched lines: %s",
+ (options['entry']))
+ raise RuntimeError(
+ "Found more than one matching crontab-entry during uninstall")
crontab.write_crontab()
More information about the Checkins
mailing list