Merge pull request #144 from droundy/master
Test in file_rename if target directory exists.
This commit is contained in:
commit
1364e6f1c0
1 changed files with 2 additions and 0 deletions
|
@ -553,6 +553,8 @@ class Buildozer(object):
|
||||||
source = join(cwd, source)
|
source = join(cwd, source)
|
||||||
target = join(cwd, target)
|
target = join(cwd, target)
|
||||||
self.debug('Rename {0} to {1}'.format(source, target))
|
self.debug('Rename {0} to {1}'.format(source, target))
|
||||||
|
if not os.path.isdir(os.path.dirname(target)):
|
||||||
|
self.error('Rename {0} to {1} fails becaues {2} is not a directory'.format(source, target, os.path.directory(target)))
|
||||||
rename(source, target)
|
rename(source, target)
|
||||||
|
|
||||||
def file_copy(self, source, target, cwd=None):
|
def file_copy(self, source, target, cwd=None):
|
||||||
|
|
Loading…
Reference in a new issue