Exemple #1
0
 def __init__(self,argv):
   argvlen = len(argv)
   _argvlen = 4
   try:
     if argvlen < _argvlen:
       message = 'usage: python %s maker_id data_type status' % argv[0]
       raise ValueError(message)
     elif argvlen >= _argvlen:
       self.maker_id= argv[1]
       self.data_type = argv[2]
       self.status = argv[3]
       is_defined_db_data_type(self.data_type)
   except Exception as e:
     log.except_log(self.logger,e)
     sys.exit(1)
Exemple #2
0
  def __init__(self,argv):
    argvlen = len(argv)
    _argvlen = 3
    try:
      if argvlen < _argvlen:
        message = 'usage: python %s start(yyyymmdd) end(yyyymmdd) type(optional)' % argv[0]
        raise ValueError(message)
      elif argvlen == _argvlen:
        self.start = argv[1]
        self.end = argv[2]
        self.types = None
      elif argvlen > _argvlen:
        self.start = argv[1]
        self.end = argv[2]
        self.types = argv[3]
        is_defined_p_api_data_type(self.types)
    except Exception as e:
      log.except_log(self.logger,e)
      sys.exit(1)

    message = 'p_api_params: start:{0},end:{1},types:{2}'.format(self.start,self.end,self.types)
    log.print_log(self.logger,message)