Skip to content

Commit e2fc88f

Browse files
committed
Do not use argparse.BooleanOptionalAction for Python 3.7 support
Python 3.7 argparse does not have BooleanOptionalAction, use a regular store_false action for compatibility.
1 parent 55ff9fc commit e2fc88f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/nxt_test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import sys
77
import nxt.locator
88

99
p = argparse.ArgumentParser(description="Test the nxt-python setup")
10-
p.add_argument("--sound", action=argparse.BooleanOptionalAction, default=True,
11-
help="enable or disable sound test")
10+
p.add_argument("--no-sound", action="store_false", dest="sound",
11+
default=True, help="disable sound test")
1212
nxt.locator.add_arguments(p)
1313
levels = ('DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL')
1414
p.add_argument("--log-level", type=str.upper, choices=levels, help="set log level")

0 commit comments

Comments
 (0)