[CalendarServer-changes] [6428] CalendarServer/trunk/calendarserver/tools/purge.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Oct 15 17:32:39 PDT 2010
Revision: 6428
http://trac.macosforge.org/projects/calendarserver/changeset/6428
Author: wsanchez at apple.com
Date: 2010-10-15 17:32:36 -0700 (Fri, 15 Oct 2010)
Log Message:
-----------
usage() should print e if present. Complain about too many args in purge_events()
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/purge.py
Modified: CalendarServer/trunk/calendarserver/tools/purge.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/purge.py 2010-10-14 20:15:46 UTC (rev 6427)
+++ CalendarServer/trunk/calendarserver/tools/purge.py 2010-10-16 00:32:36 UTC (rev 6428)
@@ -56,6 +56,7 @@
print ""
if e:
+ sys.stderr.write("%s\n" % (e,))
sys.exit(64)
else:
sys.exit(0)
@@ -75,6 +76,7 @@
print ""
if e:
+ sys.stderr.write("%s\n" % (e,))
sys.exit(64)
else:
sys.exit(0)
@@ -160,10 +162,18 @@
else:
raise NotImplementedError(opt)
+ if args:
+ usage_purge_events("Too many arguments: %s" % (args,))
+
cutoff = (date.today()-timedelta(days=days)).strftime("%Y%m%dT000000Z")
- shared_main(configFileName, purgeOldEvents, cutoff, verbose=verbose,
- dryrun=dryrun)
+ shared_main(
+ configFileName,
+ purgeOldEvents,
+ cutoff,
+ verbose=verbose,
+ dryrun=dryrun,
+ )
def main_purge_principals():
@@ -205,7 +215,13 @@
# args is a list of guids
- shared_main(configFileName, purgeGUIDs, args, verbose=verbose, dryrun=dryrun)
+ shared_main(
+ configFileName,
+ purgeGUIDs,
+ args,
+ verbose=verbose,
+ dryrun=dryrun,
+ )
@inlineCallbacks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101015/947d8161/attachment.html>
More information about the calendarserver-changes
mailing list