mirror of
				https://github.com/gsi-upm/senpy
				synced 2025-11-04 09:18:16 +00:00 
			
		
		
		
	add option to show senpy version number
Merge branch 'patch-5' of https://github.com/drevicko/senpy into drevicko-patch-5
This commit is contained in:
		@@ -78,7 +78,16 @@ def main():
 | 
			
		||||
        action='store_true',
 | 
			
		||||
        default=False,
 | 
			
		||||
        help='Do not run a server, only install plugin dependencies')
 | 
			
		||||
    parser.add_argument(
 | 
			
		||||
        '--version',
 | 
			
		||||
        '-v',
 | 
			
		||||
        action='store_true',
 | 
			
		||||
        default=False,
 | 
			
		||||
        help='Output the senpy version and exit')
 | 
			
		||||
    args = parser.parse_args()
 | 
			
		||||
    if args.version:
 | 
			
		||||
        print('Senpy version {}'.format(senpy.__version__))
 | 
			
		||||
        exit(1)
 | 
			
		||||
    logging.basicConfig()
 | 
			
		||||
    rl = logging.getLogger()
 | 
			
		||||
    rl.setLevel(getattr(logging, args.level))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user