File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,24 +183,28 @@ def main():
183183 for arg in args :
184184 c .addroot (arg )
185185
186- if not norun :
186+ try :
187+
188+ if not norun :
189+ try :
190+ c .run ()
191+ except KeyboardInterrupt :
192+ if verbose > 0 :
193+ print "[run interrupted]"
194+
187195 try :
188- c .run ()
196+ c .report ()
189197 except KeyboardInterrupt :
190198 if verbose > 0 :
191- print "[run interrupted]"
199+ print "[report interrupted]"
192200
193- try :
194- c .report ()
195- except KeyboardInterrupt :
196- if verbose > 0 :
197- print "[report interrupted]"
198-
199- if c .save_pickle (dumpfile ):
200- if dumpfile == DUMPFILE :
201- print "Use ``%s -R'' to restart." % sys .argv [0 ]
202- else :
203- print "Use ``%s -R -d %s'' to restart." % (sys .argv [0 ], dumpfile )
201+ finally :
202+ if c .save_pickle (dumpfile ):
203+ if dumpfile == DUMPFILE :
204+ print "Use ``%s -R'' to restart." % sys .argv [0 ]
205+ else :
206+ print "Use ``%s -R -d %s'' to restart." % (sys .argv [0 ],
207+ dumpfile )
204208
205209
206210def load_pickle (dumpfile = DUMPFILE , verbose = VERBOSE ):
You can’t perform that action at this time.
0 commit comments