Skip to content

Commit

Permalink
Tidyup some messages
Browse files Browse the repository at this point in the history
  • Loading branch information
devcurmudgeon committed Jul 3, 2016
1 parent 0b19284 commit 29c8430
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ybd/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ def hardlink_all_files(srcpath, destpath):


def _process_tree(root, srcpath, destpath, actionfunc):
if os.path.lexists(destpath):
app.log('OVERLAPS', 'WARNING: overlap at', destpath, verbose=True)

file_stat = os.lstat(srcpath)
mode = file_stat.st_mode

Expand All @@ -151,8 +154,9 @@ def _process_tree(root, srcpath, destpath, actionfunc):
print 'realpath is', realpath

app.log('UTILS', 'ERROR: file operation failed', exit=True)

if not stat.S_ISDIR(dest_stat.st_mode):
raise IOError('Destination not a directory. source has %s'
raise IOError('Destination not a directory: source has %s'
' destination has %s' % (srcpath, destpath))

for entry in os.listdir(srcpath):
Expand Down Expand Up @@ -195,8 +199,7 @@ def _process_tree(root, srcpath, destpath, actionfunc):

else:
# Unsupported type.
raise IOError('Cannot extract %s into staging-area. Unsupported'
' type.' % srcpath)
raise IOError('Cannot stage %s, unsupported type' % srcpath)


def copy_file_list(srcpath, destpath, filelist):
Expand Down

0 comments on commit 29c8430

Please sign in to comment.