Verbose option.
This commit is contained in:
		
							parent
							
								
									5f313dc682
								
							
						
					
					
						commit
						db9b3f25f9
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		|  | @ -1,6 +1,6 @@ | ||||||
| import sys | import sys | ||||||
| 
 | 
 | ||||||
| 
 | from osdk import const | ||||||
| from osdk.args import parse | from osdk.args import parse | ||||||
| from osdk.cmds import exec, usage | from osdk.cmds import exec, usage | ||||||
| from osdk.plugins import loadAll | from osdk.plugins import loadAll | ||||||
|  | @ -8,9 +8,13 @@ import osdk.vt100 as vt100 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def main() -> int: | def main() -> int: | ||||||
|  |     a = parse(sys.argv[1:]) | ||||||
|  | 
 | ||||||
|  |     if not a.consumeOpt("verbose", False): | ||||||
|  |         sys.stderr = open(f"{const.OSDK_DIR}/osdk.log", "w") | ||||||
|  | 
 | ||||||
|     try: |     try: | ||||||
|         loadAll() |         loadAll() | ||||||
|         a = parse(sys.argv[1:]) |  | ||||||
|         exec(a) |         exec(a) | ||||||
|         return 0 |         return 0 | ||||||
|     except Exception as e: |     except Exception as e: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue