Stay compatible to Click 5.x
There could be some odd circumstances in development environments leading to an older Click version being installed during an update restart, so since it doesn't hurt as much to stay backwards compatible here, just be it.
This commit is contained in:
parent
a462f1ce3d
commit
084263d811
1 changed files with 6 additions and 2 deletions
|
|
@ -210,8 +210,12 @@ def main():
|
|||
import sys
|
||||
|
||||
# os args are gained differently on win32
|
||||
from click.utils import get_os_args
|
||||
args = get_os_args()
|
||||
try:
|
||||
from click.utils import get_os_args
|
||||
args = get_os_args()
|
||||
except ImportError:
|
||||
# for whatever reason we are running an older Click version?
|
||||
args = sys.argv[1:]
|
||||
|
||||
if len(args) >= len(sys.argv):
|
||||
# Now some ugly preprocessing of our arguments starts. We have a somewhat difficult situation on our hands
|
||||
|
|
|
|||
Loading…
Reference in a new issue