--- a/cargo2rpm/__main__.py 2023-03-06 05:26:17.000000000 -0800 +++ b/cargo2rpm/__main__.py 2023-04-23 17:48:09.000000000 -0700 @@ -93,8 +93,8 @@ print("Missing '--path' argument.") exit(1) - match args.action: - case "buildrequires": +# match args.action: + if args.action == "buildrequires": try: action_buildrequires(args) exit(0) @@ -104,7 +104,7 @@ break_the_build(pretty_called_process_error(exc)) exit(1) - case "requires": + elif args.action == "requires": try: action_requires(args) exit(0) @@ -117,7 +117,7 @@ break_the_build(exc.error) exit(1) - case "provides": + elif args.action == "provides": try: action_provides(args) exit(0) @@ -130,7 +130,7 @@ break_the_build(exc.error) exit(1) - case "name": + elif args.action == "name": try: metadata = Metadata.from_cargo(args.path) except subprocess.CalledProcessError as exc: @@ -146,7 +146,7 @@ print(metadata.packages[0].name) exit(0) - case "version": + elif args.action == "version": try: metadata = Metadata.from_cargo(args.path) except subprocess.CalledProcessError as exc: @@ -162,7 +162,7 @@ print(metadata.packages[0].version) exit(0) - case "is-lib": + elif args.action == "is-lib": try: metadata = Metadata.from_cargo(args.path) except subprocess.CalledProcessError as exc: @@ -176,7 +176,7 @@ print("0", end="") exit(0) - case "is-bin": + elif args.action == "is-bin": try: metadata = Metadata.from_cargo(args.path) except subprocess.CalledProcessError as exc: @@ -190,15 +190,15 @@ print("0", end="") exit(0) - case "semver2rpm": + elif args.action == "semver2rpm": print(Version.parse(args.version).to_rpm()) exit(0) - case "rpm2semver": + elif args.action == "rpm2semver": print(str(Version.from_rpm(args.version))) exit(0) - case _: + else : #args.action == _: print("Unknown action.") exit(1)