Don't display ERROR: 2 when argparse exits with non-0
This commit is contained in:
		
							parent
							
								
									e80ccc4647
								
							
						
					
					
						commit
						eab354603f
					
				|  | @ -1780,7 +1780,8 @@ def main(): | ||||||
|         print_('\nCancelling...') |         print_('\nCancelling...') | ||||||
|     except (SpeedtestException, SystemExit): |     except (SpeedtestException, SystemExit): | ||||||
|         e = get_exception() |         e = get_exception() | ||||||
|         if getattr(e, 'code', 1) != 0: |         # Ignore a successful exit, or argparse exit | ||||||
|  |         if getattr(e, 'code', 1) not in (0, 2): | ||||||
|             raise SystemExit('ERROR: %s' % e) |             raise SystemExit('ERROR: %s' % e) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue