diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2006-05-09 14:30:28 -0400 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-05-09 14:30:28 -0400 |
commit | 18f4e528abe5a46c8b1df402b639dee3ba0d1f41 (patch) | |
tree | 2929a6ed44fa5064519bc19cb98f7e367f741501 /cobbler/action_sync.py | |
parent | 89a38d1c2db3d38a45644df8fe29e0769eb9b230 (diff) | |
download | third_party-cobbler-18f4e528abe5a46c8b1df402b639dee3ba0d1f41.tar.gz third_party-cobbler-18f4e528abe5a46c8b1df402b639dee3ba0d1f41.tar.xz third_party-cobbler-18f4e528abe5a46c8b1df402b639dee3ba0d1f41.zip |
More nonroot checking.
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 b00bb6b..9e681a6 100644 --- a/cobbler/action_sync.py +++ b/cobbler/action_sync.py @@ -36,6 +36,8 @@ class BootSync: Syncs the current configuration file with the config tree. Using the Check().run_ functions previously is recommended """ + if not os.path.exists(self.settings.tftpboot): + raise cexceptions.CobblerException("no_dir",self.settings.tftpboot) self.verbose = verbose self.dryrun = dryrun self.clean_trees() @@ -329,7 +331,8 @@ class BootSync: try: return shutil.rmtree(path) except OSError, ioe: - raise cexceptions.CobblerException("no_delete",path) + if not ioe.errno == 2: # already exists + raise cexceptions.CobblerException("no_delete",path) def mkdir(self,path,mode=0777): """ |