Swallow mkd fail in case nlst doesn't work #4695

This commit is contained in:
Nick Bolton 2015-05-25 16:22:45 +01:00
parent 91d05c29db
commit d278c2d8d4
1 changed files with 3 additions and 1 deletions

View File

@ -44,7 +44,9 @@ class FtpUploader:
def changeDir(self, ftp, dir):
if dir not in ftp.nlst():
print "Creating dir '%s'" % dir
try:
ftp.mkd(dir)
except:
print "Changing to dir '%s'" % dir
ftp.cwd(dir)