mirror of
https://github.com/romanz/amodem.git
synced 2026-04-25 00:37:35 +08:00
CLI: handle missing argcomplete package
This commit is contained in:
@@ -10,7 +10,10 @@ else:
|
||||
_stdout = sys.stdout.buffer
|
||||
|
||||
import argparse
|
||||
try:
|
||||
import argcomplete
|
||||
except ImportError:
|
||||
argcomplete = None
|
||||
|
||||
import logging
|
||||
|
||||
@@ -109,6 +112,7 @@ def main():
|
||||
output_type=FileType('wb')
|
||||
)
|
||||
|
||||
if argcomplete:
|
||||
argcomplete.autocomplete(p)
|
||||
args = p.parse_args()
|
||||
if args.verbose == 0:
|
||||
|
||||
Reference in New Issue
Block a user