diff options
Diffstat (limited to 'cobbler/utils.py')
-rw-r--r-- | cobbler/utils.py | 11 |
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: |