File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed
Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change 44from config import *
55from reports import *
66import sys
7+ from datetime import datetime
8+ import traceback
9+
710
811def main ( args ):
912 wiki = args [1 ]
@@ -15,14 +18,21 @@ def main ( args ):
1518 else :
1619 methods .append (arg )
1720
18- for m in methods :
19- print ( m )
20- run = Run ( wiki , dry_run )
21- method = getattr ( run , str ( m ) )
22- if not method :
23- raise Exception ( "Method not implemented" )
24- else :
25- method ()
21+ try :
22+ for m in methods :
23+ print ( m )
24+ run = Run ( wiki , dry_run )
25+ method = getattr ( run , str ( m ) )
26+ if not method :
27+ raise Exception ( "Method not implemented" )
28+ else :
29+ method ()
30+ except Exception :
31+ ts = datetime .now ().replace (microsecond = 0 ).isoformat ()
32+ print (ts + ' ' , end = '' , file = sys .stderr )
33+ traceback .print_exc (file = sys .stderr )
34+ sys .exit (1 )
35+
2636
2737class Run :
2838 def __init__ ( self , wiki , dry_run ):
You can’t perform that action at this time.
0 commit comments