Handle argv being None.

This commit is contained in:
Carl Meyer 2017-08-03 10:22:45 -07:00
parent 4e58068657
commit 06a5e19769

View file

@ -2,6 +2,7 @@
from __future__ import print_function
import logging
import sys
import time
import flake8
@ -115,7 +116,7 @@ class Application(object):
# do not need to worry and we can continue. If it is, we successfully
# defer printing the version until just a little bit later.
# Similarly we have to defer printing the help text until later.
args = argv[:]
args = (argv or sys.argv)[:]
try:
args.remove('--version')
except ValueError: