Skip to content

Commit f401802

Browse files
committed
more
1 parent 24fd7ee commit f401802

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python-sdk/kiota-gen.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
# https://stackoverflow.com/a/7171315/7898052
17-
def os_bits(machine=platform.machine().lower()):
17+
def os_bits(machine):
1818
machine2bits = {"amd64": 64, "arm64": 64, "x86_64": 64, "i386": 32, "x86": 32}
1919
return machine2bits.get(machine, None)
2020

@@ -25,12 +25,13 @@ def generate_kiota_client_files(setup_kwargs):
2525
print("Unsupported operating system.")
2626
exit(1)
2727

28-
kiota_arch_name = KIOTA_ARCH_NAMES.get(os_bits(), None)
28+
machine = platform.machine().lower()
29+
kiota_arch_name = KIOTA_ARCH_NAMES.get(os_bits(machine), None)
2930
if kiota_arch_name is None:
3031
print("Unsupported architecture.")
3132
exit(1)
3233

33-
if platform.processor()[0] == "arm" and kiota_arch_name == "x64":
34+
if machine.startswith("arm") and kiota_arch_name == "x64":
3435
kiota_arch_name = "arm64"
3536

3637
kiota_release_name = f"{kiota_os_name}-{kiota_arch_name}.zip"

0 commit comments

Comments
 (0)