diff options
author | Dusty Phillips <buchuki@gmail.com> | 2008-07-06 03:36:47 +0200 |
---|---|---|
committer | Dusty Phillips <buchuki@gmail.com> | 2008-07-06 03:36:47 +0200 |
commit | d7983e603dbcf35fcdbc4f5813e7055a77e1f581 (patch) | |
tree | 8dc6ae34ac51b49d3bf472199bb3b24a7a747b12 | |
parent | 91b3ddd47f15851cd1686adbf9181fc46b9730a3 (diff) | |
download | archweb-d7983e603dbcf35fcdbc4f5813e7055a77e1f581.tar.gz archweb-d7983e603dbcf35fcdbc4f5813e7055a77e1f581.tar.xz |
minor refactor to available_arches
-rwxr-xr-x | scripts/reporead.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/reporead.py b/scripts/reporead.py index 412962a..d9637ab 100755 --- a/scripts/reporead.py +++ b/scripts/reporead.py @@ -322,8 +322,8 @@ def main(argv=None): usage() return 0 # check if arch is valid - available_arches = Arch.objects.all() - if argv[1] not in [x.name for x in available_arches]: + available_arches = [x.name for x in Arch.objects.all()] + if argv[1] not in available_arches: usage() return 0 else: @@ -335,10 +335,10 @@ def main(argv=None): # sort packages by arch -- to handle noarch stuff packages_arches = {} for arch in available_arches: - packages_arches[arch.name] = [] + packages_arches[arch] = [] for package in packages: - if package.arch not in [x.name for x in available_arches]: + if package.arch not in available_arches: logger.warning("Package %s arch = %s" % (package.name,package.arch)) package.arch = primary_arch packages_arches[package.arch].append(package) |