cleanup
This commit is contained in:
		
					parent
					
						
							
								26aeb78f61
							
						
					
				
			
			
				commit
				
					
						5b44034602
					
				
			
		
					 4 changed files with 14 additions and 22 deletions
				
			
		|  | @ -18,21 +18,16 @@ if __name__ == "__main__": | |||
|     arg_parser.add_argument('component_args', nargs='*') | ||||
|     args = arg_parser.parse_args() | ||||
| 
 | ||||
|     if args.conf_dir: | ||||
|         os.environ['UCLOUD_CONF_DIR'] = args.conf_dir | ||||
| 
 | ||||
|     try: | ||||
|         name = args.component | ||||
|         mod = importlib.import_module("ucloud.{}.main".format(name)) | ||||
|         main = getattr(mod, "main") | ||||
| 
 | ||||
|         if args.conf_dir: | ||||
|             print("setting conf") | ||||
|             os.environ['UCLOUD_CONF_DIR'] = args.conf_dir | ||||
| 
 | ||||
|         main() | ||||
| 
 | ||||
|     # except decouple.UndefinedValueError as e: | ||||
|     #     print(e) | ||||
|     #     sys.exit(1) | ||||
| 
 | ||||
|     except Exception as e: | ||||
|         logging.exception(e) | ||||
|         print(e) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue