summaryrefslogtreecommitdiffstats
path: root/cobbler/action_enchant.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-10-12 18:04:08 -0400
committerJim Meyering <jim@meyering.net>2006-10-12 18:04:08 -0400
commit6e84895b828b4fa5e3c45464dd08949fa382dfa5 (patch)
treed8a23136fc4a777eafe5e84260a1d7cf00005aeb /cobbler/action_enchant.py
parent456770c8daa2f3f74d4158a6038e28fcc6cd911f (diff)
downloadthird_party-cobbler-6e84895b828b4fa5e3c45464dd08949fa382dfa5.tar.gz
third_party-cobbler-6e84895b828b4fa5e3c45464dd08949fa382dfa5.tar.xz
third_party-cobbler-6e84895b828b4fa5e3c45464dd08949fa382dfa5.zip
Initial code behind an import feature for directory trees, i.e. to transform something like
/mnt/redhat (containing a lot of OS builds with trees) into distributions and profiles directly.
Diffstat (limited to 'cobbler/action_enchant.py')
-rw-r--r--cobbler/action_enchant.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cobbler/action_enchant.py b/cobbler/action_enchant.py
index ce28f0c..03ad987 100644
--- a/cobbler/action_enchant.py
+++ b/cobbler/action_enchant.py
@@ -24,12 +24,14 @@ class Enchant:
def __init__(self,config,sysname,password=''):
"""
- Constructor. All arguments required.
+ Constructor. If password is None it should rely on SSH key auth.
"""
self.config = config
self.settings = self.config.settings()
self.username = "root"
self.sysname = sysname
+ if sysname is None:
+ raise cexception.CobblerException("enchant_failed","no system name specified")
self.profile = ''
self.password = password