Last active
January 23, 2023 21:36
-
-
Save abadger/0b89fd9169100af815fa755a8d299ab5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
no_arch_data = None | |
name = epoch = vresion = release = arch = None | |
for [....]: | |
# current arch is valid | |
if re.findall(".*(x86_64|s390x|i86|ppc64le|aarch64)$", str(nevra.arch)): | |
name = nevra.name | |
epoch = epoch or nevra.epoch | |
version = nevra.version | |
release = nevra.release | |
arch = nevra.arch | |
break | |
# there is no arch present and current arch is None | |
if nevra.arch is None: | |
no_arch_data = nevra | |
# arch is not valid, move on to next iteration | |
else: | |
continue | |
else: # This else goes with the for loop: https://docs.python.org/3/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops | |
name = nevra.name | |
epoch = epoch or nevra.epoch | |
version = nevra.version | |
release = nevra.release | |
arch = nevra.arch | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment