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_import.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_import.py')
-rw-r--r-- | cobbler/action_import.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cobbler/action_import.py b/cobbler/action_import.py index 660c154..6c398c7 100644 --- a/cobbler/action_import.py +++ b/cobbler/action_import.py @@ -107,6 +107,11 @@ class Importer: for valid_root in valid_roots: if self.network_root.startswith(valid_root): found_root = True + if self.network_root.startswith("nfs://"): + try: + (a,b,rest) = self.network_root.split(":",3) + except: + raise CX(_("Network root given to --available-as is missing a colon, please see the manpage example.")) if not found_root: raise CX(_("Network root given to --available-as must be nfs://, ftp://, or http://")) |