File tree Expand file tree Collapse file tree
remove-json-keys/src/remove_json_keys/lib
translate-messages/src/translate_messages/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,13 +68,12 @@ def load(cli, caller_file):
6868 if getattr (ctrl , 'subcmd' , False ) and next (arg for arg in ctrl .args if arg .startswith ('--' ))[2 :] in sys .argv :
6969 setattr (parsed_args , attr_name , True )
7070 for key , val in vars (parsed_args ).items (): # apply parsed_args to cli.config
71- if not getattr (cli .config , key , '' ):
72- setattr (cli .config , key , val )
71+ if val : setattr (cli .config , key , val )
7372 log .debug ('Args parsed!\n {}' , cli )
7473
7574 # Init all cli.config vals
7675 for name , ctrl in vars (controls ).items ():
77- val = getattr (cli .config , name , None )
76+ val = getattr (cli .config , name , '' )
7877 if getattr (ctrl , 'parser' , None ) == 'csv' :
7978 val = data .csv .parse (val )
8079 if val is None and hasattr (ctrl , 'default_val' ):
Original file line number Diff line number Diff line change @@ -78,13 +78,12 @@ def load(cli, caller_file):
7878 if getattr (ctrl , 'subcmd' , False ) and next (arg for arg in ctrl .args if arg .startswith ('--' ))[2 :] in sys .argv :
7979 setattr (parsed_args , attr_name , True )
8080 for key , val in vars (parsed_args ).items (): # apply parsed_args to cli.config
81- if not getattr (cli .config , key , '' ):
82- setattr (cli .config , key , val )
81+ if val : setattr (cli .config , key , val )
8382 log .debug ('Args parsed!\n {}' , cli )
8483
8584 # Init all cli.config vals
8685 for name , ctrl in vars (controls ).items ():
87- val = getattr (cli .config , name , None )
86+ val = getattr (cli .config , name , '' )
8887 if getattr (ctrl , 'parser' , None ) == 'csv' :
8988 val = data .csv .parse (val )
9089 if val is None and hasattr (ctrl , 'default_val' ):
You can’t perform that action at this time.
0 commit comments