Show More
@@ -125,23 +125,26 class Command(BasePasterCommand): | |||
|
125 | 125 | if remove: |
|
126 | 126 | for path, date_ in to_remove: |
|
127 | 127 | print >> sys.stdout, 'removing repository %s' % path |
|
128 |
shutil.rmtree(path) |
|
|
128 | shutil.rmtree(path) | |
|
129 | 129 | else: |
|
130 | 130 | print 'nothing done exiting...' |
|
131 | 131 | sys.exit(0) |
|
132 | 132 | |
|
133 | 133 | def update_parser(self): |
|
134 |
self.parser.add_option( |
|
|
135 | action='store', | |
|
136 | dest='older_than', | |
|
137 | help=( | |
|
138 |
|
|
|
139 |
|
|
|
140 |
|
|
|
141 |
|
|
|
142 |
|
|
|
143 |
|
|
|
144 | self.parser.add_option('--dont-ask', | |
|
145 | action='store_true', | |
|
146 |
|
|
|
147 | help=("Don't ask to remove repos")) | |
|
134 | self.parser.add_option( | |
|
135 | '--older-than', | |
|
136 | action='store', | |
|
137 | dest='older_than', | |
|
138 | help=("only remove repos that have been removed " | |
|
139 | "at least given time ago " | |
|
140 | "ex. --older-than=30d deletes repositores " | |
|
141 | "removed more than 30days ago. Possible options " | |
|
142 | "d[ays]/h[ours]/m[inutes]/s[seconds]. OPTIONAL") | |
|
143 | ) | |
|
144 | ||
|
145 | self.parser.add_option( | |
|
146 | '--dont-ask', | |
|
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