NEW: added new command line switch "-l" for logging to a file, also modified "-v" to set the debug level
This commit is contained in:
		
							parent
							
								
									0465d31781
								
							
						
					
					
						commit
						c51cfb7bad
					
				
							
								
								
									
										13
									
								
								dbfp.py
								
								
								
								
							
							
						
						
									
										13
									
								
								dbfp.py
								
								
								
								
							| 
						 | 
					@ -16,8 +16,6 @@ FP_BASE_DIR = "fingerprints"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def main():
 | 
					def main():
 | 
				
			||||||
  # logging.basicConfig(filename='dbfp.log', level=logging.DEBUG)
 | 
					 | 
				
			||||||
  logging.basicConfig(level=logging.DEBUG)
 | 
					 | 
				
			||||||
  parseArgs()
 | 
					  parseArgs()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
| 
						 | 
					@ -144,10 +142,19 @@ def parseArgs():
 | 
				
			||||||
  parser.add_argument('-av', '--app_version', required=False)
 | 
					  parser.add_argument('-av', '--app_version', required=False)
 | 
				
			||||||
  parser.add_argument('-n', '--notes', required=False)
 | 
					  parser.add_argument('-n', '--notes', required=False)
 | 
				
			||||||
  parser.add_argument('-pull', required=False, action='store_true', help="automated pull of applications from a physical android phone")
 | 
					  parser.add_argument('-pull', required=False, action='store_true', help="automated pull of applications from a physical android phone")
 | 
				
			||||||
  parser.add_argument('-v', '--verbose', action='store_true')
 | 
					  parser.add_argument('-v', '--verbose', action='store_true', help="will set logging level to DEBUG")
 | 
				
			||||||
 | 
					  parser.add_argument('-l', '--logging', action='store_true', help="will supercede the -v option and send all logging to a file, logging.DEBUG")
 | 
				
			||||||
  # parser.add_argument('-t', '--title', required=False)
 | 
					  # parser.add_argument('-t', '--title', required=False)
 | 
				
			||||||
  args = parser.parse_args()
 | 
					  args = parser.parse_args()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (args.logging):
 | 
				
			||||||
 | 
					    logging.basicConfig(filename='dbfp.log', level=logging.DEBUG)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (args.verbose):
 | 
				
			||||||
 | 
					    logging.basicConfig(level=logging.DEBUG)
 | 
				
			||||||
 | 
					  else:
 | 
				
			||||||
 | 
					    logging.basicConfig(level=logging.CRITICAL)
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
  if (args.file and args.fingerprint):
 | 
					  if (args.file and args.fingerprint):
 | 
				
			||||||
    compareFingerprint(args.file, args.fingerprint)      
 | 
					    compareFingerprint(args.file, args.fingerprint)      
 | 
				
			||||||
  elif (args.file and args.fpdir):
 | 
					  elif (args.file and args.fpdir):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue