Parse the args the function is given, don't assume sys.argv.
Chris Pressey
2 years ago
231 | 231 |
help='Enable logging and direct the messages to the specified file'
|
232 | 232 |
)
|
233 | 233 |
|
234 | |
options = argparser.parse_args(sys.argv[1:])
|
|
234 |
options = argparser.parse_args(args)
|
235 | 235 |
|
236 | 236 |
if options.log_to:
|
237 | 237 |
logging.basicConfig(level=logging.INFO, filename=options.log_to)
|