summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-12-18 17:41:49 -0500
committerJim Meyering <jim@meyering.net>2006-12-18 17:41:49 -0500
commitd04b579ba1f5f0b6f8978cf1a6f07b5b44f39f7a (patch)
tree67e4b5262527ff77ee006612bcb4a199963d2b16
parent1f7d909853d1ac0d8d3fb05f5417ce83711c0ae5 (diff)
downloadthird_party-cobbler-d04b579ba1f5f0b6f8978cf1a6f07b5b44f39f7a.tar.gz
third_party-cobbler-d04b579ba1f5f0b6f8978cf1a6f07b5b44f39f7a.tar.xz
third_party-cobbler-d04b579ba1f5f0b6f8978cf1a6f07b5b44f39f7a.zip
Ensure repo type is converted to a list if not already a list.
-rw-r--r--cobbler/action_sync.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py
index 2e20535..152d028 100644
--- a/cobbler/action_sync.py
+++ b/cobbler/action_sync.py
@@ -294,7 +294,9 @@ class BootSync:
# the list of repos to things that Anaconda can install from. This corresponds
# will replace "TEMPLATE::yum_repo_stanza" in a cobbler kickstart file.
buf = ""
- repos = profile.repos.split(" ")
+ repos = profile.repos
+ if type(profile.repos) == str:
+ repos = repos.split(" ")
for r in repos:
repo = self.repos.find(r)
if repo is None:
@@ -305,7 +307,9 @@ class BootSync:
def generate_config_stanza(self, profile):
# returns the line in post that would configure yum to use repos added with "cobbler repo add"
- repos = profile.repos.split(" ")
+ repos = profile.repos
+ if type(profiles.repos) == str:
+ repos = repos.split(" ")
buf = ""
for r in repos:
repo = self.repos.find(r)