mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-31 11:16:54 +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
|
||||
|
||||
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue