mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-12 15:44:17 +00:00
Handle argv being None.
This commit is contained in:
parent
4e58068657
commit
06a5e19769
1 changed files with 2 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import flake8
|
import flake8
|
||||||
|
|
@ -115,7 +116,7 @@ class Application(object):
|
||||||
# do not need to worry and we can continue. If it is, we successfully
|
# do not need to worry and we can continue. If it is, we successfully
|
||||||
# defer printing the version until just a little bit later.
|
# defer printing the version until just a little bit later.
|
||||||
# Similarly we have to defer printing the help text until later.
|
# Similarly we have to defer printing the help text until later.
|
||||||
args = argv[:]
|
args = (argv or sys.argv)[:]
|
||||||
try:
|
try:
|
||||||
args.remove('--version')
|
args.remove('--version')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue