# HG changeset patch # User Marcin Kuzminski # Date 2013-02-21 01:39:37 # Node ID 4b84f435594bc369c4201decc800d18f4fda644d # Parent fe2bb88bf7ac7d117b090f9d1814b5aca7332215 fixed cleanup command diff --git a/rhodecode/lib/paster_commands/cleanup.py b/rhodecode/lib/paster_commands/cleanup.py --- a/rhodecode/lib/paster_commands/cleanup.py +++ b/rhodecode/lib/paster_commands/cleanup.py @@ -125,23 +125,26 @@ class Command(BasePasterCommand): if remove: for path, date_ in to_remove: print >> sys.stdout, 'removing repository %s' % path - shutil.rmtree(path)) + shutil.rmtree(path) else: print 'nothing done exiting...' sys.exit(0) def update_parser(self): - self.parser.add_option('--older-than', - action='store', - dest='older_than', - help=( - "only remove repos that have been removed " - "at least given time ago " - "ex. --older-than=30d deletes repositores " - "removed more than 30days ago. Possible options " - "d[ays]/h[ours]/m[inutes]/s[seconds]. OPTIONAL"), - ) - self.parser.add_option('--dont-ask', - action='store_true', - dest='dont_ask', - help=("Don't ask to remove repos")) + self.parser.add_option( + '--older-than', + action='store', + dest='older_than', + help=("only remove repos that have been removed " + "at least given time ago " + "ex. --older-than=30d deletes repositores " + "removed more than 30days ago. Possible options " + "d[ays]/h[ours]/m[inutes]/s[seconds]. OPTIONAL") + ) + + self.parser.add_option( + '--dont-ask', + action="store_true", + dest="dont_ask", + help="Don't ask to remove repos" + )