Commit ba4ffa31 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b81bf3f5
...@@ -78,16 +78,16 @@ XXX ...@@ -78,16 +78,16 @@ XXX
Options: Options:
--gc perform garbage-collection as well --nogc don't perform garbage-collection
-h --help show this help -h --help show this help
""", file=out) """, file=out)
@func @func
def main(argv): def main(argv):
gc = False gc = True
try: try:
optv, argv = getopt.getopt(argv[1:], "h", ["gc", "help"]) optv, argv = getopt.getopt(argv[1:], "h", ["nogc", "help"])
except getopt.GetoptError as e: except getopt.GetoptError as e:
print(e, file=sys.stderr) print(e, file=sys.stderr)
usage(sys.stderr) usage(sys.stderr)
...@@ -97,8 +97,8 @@ def main(argv): ...@@ -97,8 +97,8 @@ def main(argv):
if opt in ("-h", "--help"): if opt in ("-h", "--help"):
usage(sys.stdout) usage(sys.stdout)
sys.exit(0) sys.exit(0)
if opt in ("--gc"): if opt in ("--nogc"):
gc = True gc = False
if len(argv) != 2: if len(argv) != 2:
usage(sys.stderr) usage(sys.stderr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment