##// END OF EJS Templates
fixed cleanup command
marcink -
r3395:4b84f435 beta
parent child Browse files
Show More
@@ -125,23 +125,26 class Command(BasePasterCommand):
125 if remove:
125 if remove:
126 for path, date_ in to_remove:
126 for path, date_ in to_remove:
127 print >> sys.stdout, 'removing repository %s' % path
127 print >> sys.stdout, 'removing repository %s' % path
128 shutil.rmtree(path))
128 shutil.rmtree(path)
129 else:
129 else:
130 print 'nothing done exiting...'
130 print 'nothing done exiting...'
131 sys.exit(0)
131 sys.exit(0)
132
132
133 def update_parser(self):
133 def update_parser(self):
134 self.parser.add_option('--older-than',
134 self.parser.add_option(
135 '--older-than',
135 action='store',
136 action='store',
136 dest='older_than',
137 dest='older_than',
137 help=(
138 help=("only remove repos that have been removed "
138 "only remove repos that have been removed "
139 "at least given time ago "
139 "at least given time ago "
140 "ex. --older-than=30d deletes repositores "
140 "ex. --older-than=30d deletes repositores "
141 "removed more than 30days ago. Possible options "
141 "removed more than 30days ago. Possible options "
142 "d[ays]/h[ours]/m[inutes]/s[seconds]. OPTIONAL"),
142 "d[ays]/h[ours]/m[inutes]/s[seconds]. OPTIONAL")
143 )
143 )
144 self.parser.add_option('--dont-ask',
144
145 action='store_true',
145 self.parser.add_option(
146 dest='dont_ask',
146 '--dont-ask',
147 help=("Don't ask to remove repos"))
147 action="store_true",
148 dest="dont_ask",
149 help="Don't ask to remove repos"
150 )
General Comments 0
You need to be logged in to leave comments. Login now