From 6626e864252cfa30b8d19cb2bd9c2ed74dacded6 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Fri, 2 Mar 2007 11:01:52 -0500 Subject: Fixes to import tree URL's and repo parameter splitting, thanks to et-mgmt-tools list folks for pointing these out. --- cobbler/action_import.py | 2 +- cobbler/item_profile.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cobbler/action_import.py b/cobbler/action_import.py index 721bb7b..ff777d4 100644 --- a/cobbler/action_import.py +++ b/cobbler/action_import.py @@ -185,7 +185,7 @@ class Importer: tokens = tokens[:-2] base = "/".join(tokens) base = base.replace(self.settings.webdir,"") - tree = "tree=http://%s/%s" % (self.settings.server, base) + tree = "tree=http://%s/cobbler_track/%s" % (self.settings.server, base) print "*** KICKSTART TREE = %s" % tree profile.set_ksmeta(tree) self.serialize_counter = self.serialize_counter + 1 diff --git a/cobbler/item_profile.py b/cobbler/item_profile.py index c6cb13a..e3df8c8 100644 --- a/cobbler/item_profile.py +++ b/cobbler/item_profile.py @@ -86,11 +86,14 @@ class Profile(item.Item): def set_repos(self,repos): if type(repos) != list: # allow backwards compatibility support of string input - repolist = repos.split(" ") + repolist = repos.split(None) else: repolist = repos ok = True - repolist.remove('') + try: + repolist.remove('') + except: + pass for r in repolist: if not self.config.repos().find(r): ok = False -- cgit