s4cmd.py
def merge_opt_params(self, method, kargs):
    '''Combine existing parameters with extra options supplied from command line
       options. Carefully merge special type of parameter if needed.
    '''
    for key in self.legal_params[method]:
      if not hasattr(self.opt, key) or getattr(self.opt, key) is None:
        continue
      if key in kargs and type(kargs[key]) == dict:
        assert(type(getattr(self.opt, key)) == dict)
        # Merge two dictionaries.
        for k, v in getattr(self.opt, key).iteritems():
          kargs[key][k] = v
      else:
        # Overwrite values.
        kargs[key] = getattr(self.opt, key)

    return kargs
def merge_opt_params(self, method, kargs):
    '''Combine existing parameters with extra options supplied from command line
       options. Carefully merge special type of parameter if needed.
    '''
    for key in self.legal_params[method]:
      if not hasattr(self.opt, key) or getattr(self.opt, key) is None:
        continue
      if key in kargs and type(kargs[key]) == dict:
        assert(type(getattr(self.opt, key)) == dict)
        # Merge two dictionaries.
        for k, v in getattr(self.opt, key).iteritems():
          kargs[key][k] = v
      else:
        # Overwrite values.
        kargs[key] = getattr(self.opt, key)

    return kargs
def merge_opt_params ( self , method , kargs ) : for key in self . legal_params [ method ] : if not hasattr ( self . opt , key ) or getattr ( self . opt , key ) is None : continue if key in kargs and type ( kargs [ key ] ) == dict : assert ( type ( getattr ( self . opt , key ) ) == dict ) # Merge two dictionaries. for k , v in getattr ( self . opt , key ) . iteritems ( ) : kargs [ key ] [ k ] = v else : # Overwrite values. kargs [ key ] = getattr ( self . opt , key ) return kargs
Combine existing parameters with extra options supplied from command line
       options. Carefully merge special type of parameter if needed.
Combine existing parameters with extra options supplied from command line options . Carefully merge special type of parameter if needed .