Skip to content

Commit

Permalink
Added more error output
Browse files Browse the repository at this point in the history
  • Loading branch information
blukis committed Feb 27, 2023
1 parent 353b70c commit c5e76ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python-blutils/blutils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# blutils.py - v1.1.0
# blutils.py - v1.1.1
# https://github.com/blukis/publictools/tree/main/python-blutils

import sys, os
Expand Down Expand Up @@ -45,7 +45,7 @@ def copyFileInto(srcPath, dstPath):
#def CopyDirOverDir(srcDir, dstDir):
def copyContentsIntoNew(srcDir, dstDir):
if not os.path.isdir(srcDir):
raise Exception("CopyContentsIntoNew src is not a dir!")
raise Exception("CopyContentsIntoNew src is not a dir! (" + srcDir + ")")
# shutil.copytree requires dst not yet exist. This is redundant.
if os.path.isdir(dstDir):
raise Exception("CopyContentsIntoNew dst exists! (" + dstDir + ")")
Expand All @@ -63,7 +63,7 @@ def copyContentsIntoExisting(srcDir, dstDir):
# Copy contents of dir into another dir. dstDir created if DNE.
def copyContentsInto(srcDir, dstDir):
if not os.path.isdir(srcDir):
raise Exception("CopyContentsInto src is not a dir!")
raise Exception("CopyContentsInto src is not a dir! (" + srcDir + ")")
# former (requires dstDir is empty): shutil.copytree(srcDir, dstDir)
distutils.dir_util.copy_tree(srcDir, dstDir)

Expand Down

0 comments on commit c5e76ae

Please sign in to comment.