aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2015-12-03 01:25:21 -0500
committerTim Harder <radhermit@gmail.com>2015-12-03 01:30:25 -0500
commit3dafd5afd1025a77cb46e0b5e59e15c4df25ad02 (patch)
tree8d133b466a0a7f5012669ffa95e9cffbbe4f5b8e
parentdefault to repos.conf names for repo IDs (diff)
downloadpkgcore-3dafd5afd1025a77cb46e0b5e59e15c4df25ad02.tar.gz
pkgcore-3dafd5afd1025a77cb46e0b5e59e15c4df25ad02.tar.bz2
pkgcore-3dafd5afd1025a77cb46e0b5e59e15c4df25ad02.zip
commandline: minor simplification for repo choices output
-rw-r--r--pkgcore/util/commandline.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgcore/util/commandline.py b/pkgcore/util/commandline.py
index 02c560017..9e6b9e062 100644
--- a/pkgcore/util/commandline.py
+++ b/pkgcore/util/commandline.py
@@ -314,10 +314,11 @@ class StoreRepoObject(StoreConfigObject):
If a repo doesn't have a proper location just the name is returned.
"""
for repo_name, repo in sorted(unstable_unique(sections.iteritems())):
- if len(repo.aliases) > 1 and hasattr(repo, 'location'):
- yield '%s:%s' % (repo.repo_id, repo.location)
+ repo_name = getattr(repo, 'repo_id', repo_name)
+ if hasattr(repo, 'location'):
+ yield '%s:%s' % (repo_name, repo.location)
else:
- yield getattr(repo, 'repo_id', repo_name)
+ yield repo_name
def _load_obj(self, sections, name):
if not self.allow_name_lookup or name in sections: