summaryrefslogtreecommitdiffstats
path: root/cobbler/utils.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-05-12 16:12:29 -0400
committerMichael DeHaan <mdehaan@redhat.com>2008-05-12 16:12:29 -0400
commitb3e6aa54f75dba69ea58797c04751b104b406136 (patch)
tree05d9bf67771f6cbd963c9d8370312f0c81e0c5c4 /cobbler/utils.py
parentaaf52ab85b518d8c6b4ed0211b69d6be531ae5a9 (diff)
downloadthird_party-cobbler-b3e6aa54f75dba69ea58797c04751b104b406136.tar.gz
third_party-cobbler-b3e6aa54f75dba69ea58797c04751b104b406136.tar.xz
third_party-cobbler-b3e6aa54f75dba69ea58797c04751b104b406136.zip
Make duplicate mac checking work in more places, nicer error when encountering rootsquash.
Diffstat (limited to 'cobbler/utils.py')
-rw-r--r--cobbler/utils.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/cobbler/utils.py b/cobbler/utils.py
index 1b4b30a..a9b374f 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -590,10 +590,13 @@ def copyfile(src,dst):
try:
return shutil.copyfile(src,dst)
except:
- if not os.path.samefile(src,dst):
- # accomodate for the possibility that we already copied
- # the file as a symlink/hardlink
- raise CX(_("Error copying %(src)s to %(dst)s") % { "src" : src, "dst" : dst})
+ try:
+ if not os.path.samefile(src,dst):
+ # accomodate for the possibility that we already copied
+ # the file as a symlink/hardlink
+ raise CX(_("Error copying %(src)s to %(dst)s") % { "src" : src, "dst" : dst})
+ except:
+ raise CX(_("Problems reading %(src)s") % { "src" : src})
def rmfile(path):
try: