diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2007-11-26 18:31:38 -0500 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2007-11-26 18:31:38 -0500 |
commit | a5ab2c031d0db8aad9ed91eddb5a662d07cd3fd9 (patch) | |
tree | 5c7f306860a743fcd8e13014d71d29a72f850f5e /cobbler/action_sync.py | |
parent | 9d7497cdced1fad271839c00804156e8a0794ac3 (diff) | |
download | third_party-cobbler-a5ab2c031d0db8aad9ed91eddb5a662d07cd3fd9.tar.gz third_party-cobbler-a5ab2c031d0db8aad9ed91eddb5a662d07cd3fd9.tar.xz third_party-cobbler-a5ab2c031d0db8aad9ed91eddb5a662d07cd3fd9.zip |
Detect when the NFS path given by the user is missing the colon, and warn them before the import. Also warn users
with existing configurations during the cobbler sync, rather than showing the generic traceback.
Diffstat (limited to 'cobbler/action_sync.py')
-rw-r--r-- | cobbler/action_sync.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py index a516bb2..00a9d80 100644 --- a/cobbler/action_sync.py +++ b/cobbler/action_sync.py @@ -607,7 +607,10 @@ class BootSync: for line in data.split("\n"): if line.find("--url") != -1 and line.find("url ") != -1: rest = metadata["tree"][6:] # strip off "nfs://" part - (server, dir) = rest.split(":",2) + try: + (server, dir) = rest.split(":",2) + except: + raise CX(_("Invalid syntax for NFS path given during import: %s" % metadata["tree"])) line = "nfs --server %s --dir %s" % (server,dir) # but put the URL part back in so koan can still see # what the original value was |