diff options
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Packages')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Packages/Yum.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py index 14d6db8a0..846fb89cd 100644 --- a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py +++ b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py @@ -456,16 +456,13 @@ class YumCollection(Collection): reponame = basereponame added = False + rid = 1 while not added: try: config.add_section(reponame) added = True except ConfigParser.DuplicateSectionError: - match = re.search(r'-(\d+)', reponame) - if match: - rid = int(match.group(1)) + 1 - else: - rid = 1 + rid += 1 reponame = "%s-%d" % (basereponame, rid) config.set(reponame, "name", reponame) |