--- a/cargo2rpm/__main__.py 2023-03-06 05:26:17.000000000 -0800 +++ b/cargo2rpm/__main__.py 2023-04-23 17:48:09.000000000 -0700 @@ -105,8 +105,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) @@ -116,7 +116,7 @@ break_the_build(pretty_called_process_error(exc)) exit(1) - case "requires": + elif args.action == "requires": try: action_requires(args) exit(0) @@ -129,7 +129,7 @@ break_the_build(exc.error) exit(1) - case "provides": + elif args.action == "provides": try: action_provides(args) exit(0) @@ -142,7 +142,7 @@ break_the_build(exc.error) exit(1) - case "parse-vendor-manifest": + elif args.action == "parse-vendor-manifest": try: action_parse_vendor_manifest(args) exit(0) @@ -152,7 +152,7 @@ break_the_build(str(exc)) exit(1) - case "name": + elif args.action == "name": try: metadata = Metadata.from_cargo(args.path) except subprocess.CalledProcessError as exc: @@ -168,7 +168,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: @@ -184,7 +184,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: @@ -198,7 +198,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: @@ -212,15 +212,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)