diff --git a/README.rst b/README.rst index 4fc9d33..b9a2c48 100644 --- a/README.rst +++ b/README.rst @@ -87,6 +87,8 @@ script behaviour: Changelog ========= +* **3.1** Argparse on Python3 have different behaviour, where if no subcommand + is provided, it will pass anyway. Fixed. * **3.0** Added beta quality Python3 support * **2.8** Treat non standard discs a bit better * **2.7** Added support for gzipped disk images diff --git a/uc1541 b/uc1541 index 84aa225..792c5bc 100755 --- a/uc1541 +++ b/uc1541 @@ -1,10 +1,10 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ UC1541 Virtual filesystem Author: Roman 'gryf' Dobosz -Date: 2018-02-13 -Version: 3.0 +Date: 2019-07-20 +Version: 3.1 Licence: BSD source: https://bitbucket.org/gryf/uc1541 mirror: https://github.com/gryf/uc1541 @@ -489,7 +489,9 @@ CALL_MAP = {'list': lambda a: Uc1541(a.arch).list(), def parse_args(): """Use ArgumentParser to check for script arguments and execute.""" parser = ArgumentParser() - subparsers = parser.add_subparsers(help='supported commands') + subparsers = parser.add_subparsers(help='supported commands', + dest='subcommand') + subparsers.required = True parser_list = subparsers.add_parser('list', help="List contents of D64 " "image") parser_copyin = subparsers.add_parser('copyin', help="Copy file into D64 "