mirror of
https://github.com/moparisthebest/uinput-mapper
synced 2024-11-25 00:52:14 -05:00
Fix optparse code.
Small difference from argparse. ;-)
This commit is contained in:
parent
4323e92a13
commit
c3e35b9260
@ -23,7 +23,7 @@ parser.add_option('-c', '--config', type=str, action='append',
|
||||
parser.add_option('-C', '--compat', action='store_true',
|
||||
help='Enable compatibility mode; for Python < 2.7')
|
||||
|
||||
args = parser.parse_args()
|
||||
args, _ = parser.parse_args()
|
||||
|
||||
# Unpickle from stdin ; currently this is the default and only way
|
||||
f = pickle.Unpickler(sys.stdin)
|
||||
@ -31,7 +31,6 @@ f = pickle.Unpickler(sys.stdin)
|
||||
conf = f.load()
|
||||
|
||||
for path in args.config:
|
||||
if path:
|
||||
config = imp.load_source('', path).config
|
||||
conf.update(config)
|
||||
|
||||
|
@ -21,7 +21,7 @@ parser.add_option('-i', '--input-file', action='append',
|
||||
parser.add_option('-C', '--compat', action='store_true',
|
||||
help='Enable compatibility mode; for Python < 2.7')
|
||||
|
||||
args = parser.parse_args()
|
||||
args, _ = parser.parse_args()
|
||||
|
||||
|
||||
if len(args.input_file) == 0:
|
||||
|
Loading…
Reference in New Issue
Block a user