File tree Expand file tree Collapse file tree 2 files changed +2
-18
lines changed
Expand file tree Collapse file tree 2 files changed +2
-18
lines changed Original file line number Diff line number Diff line change 11# Base class; subclasses will automatically show up as subcommands
22import argparse
33import os
4+ import os .path
45import sys
56
67from .. import logging
@@ -25,10 +26,8 @@ def __init__(self, parser):
2526 add_common_estimation_args (parser )
2627
2728 def main (self , args ):
28- try :
29+ if not os . path . isdir ( args . outdir ) :
2930 os .makedirs (args .outdir )
30- except OSError :
31- pass # directory exists
3231 # Initialize the logger
3332 # Do this before calling super().main() so that
3433 # any debugging output generated there gets logged
Original file line number Diff line number Diff line change @@ -33,22 +33,7 @@ def __init__(self, parser):
3333 help = "data file(s) in SMC++ format" )
3434
3535 def main (self , args ):
36- # Initialize the logger
37- # Do this before calling super().main() so that
38- # any debugging output generated there gets logged
39- add_debug_log (os .path .join (args .outdir , ".debug.txt" ))
40-
4136 command .EstimationCommand .main (self , args )
42- # Create output directory
43- try :
44- os .makedirs (args .outdir )
45- except OSError :
46- pass # directory exists
47-
48- # Save all the command line args and stuff
49- logger .debug (sys .argv )
50- logger .debug (args )
51-
5237 # Fill in some of the population-genetic parameters from previous model run
5338 # TODO ensure that these params agree in both models?
5439 d = json .load (open (args .pop1 , "rt" ))
You can’t perform that action at this time.
0 commit comments