[Checkins] SVN: z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py Removed two unused methods
Reinout van Rees
reinout at vanrees.org
Tue Jun 16 09:32:48 EDT 2009
Log message for revision 101081:
Removed two unused methods
Changed:
U z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py
-=-
Modified: z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py
===================================================================
--- z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py 2009-06-16 13:30:02 UTC (rev 101080)
+++ z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py 2009-06-16 13:32:47 UTC (rev 101081)
@@ -15,33 +15,6 @@
APPEND = '# END %s'
-def escape_string(s):
- """
- Do a smart escape of string s, wrapping it in quotes and escaping
- those quotes if necessary. If the first or last byte is a space,
- also quote the string.
- """
- for c, d in (('"', "'"), ("'", '"')):
- if c in s:
- return '%s%s%s' % (d, s.replace(d, '\\'+d), d)
- if len(s)==0 or s[0].isspace() or s[-1].isspace():
- return '"%s"' % s
-
- return s
-
-
-def unescape_string(s):
- """
- Unescape any escaped quotes, and remove quotes around the string
- """
- if len(s)==0:
- return s
- for c in ('"', "'"):
- if(s[0]==c and s[-1]==c):
- return s[1:-1].replace('\\'+c, c)
- return s
-
-
defaultreadcrontab = "crontab -l"
defaultwritecrontab = "crontab -"
More information about the Checkins
mailing list