From d278c2d8d41e12cbfb2bee5e14861a2a9753780b Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Mon, 25 May 2015 16:22:45 +0100 Subject: [PATCH] Swallow mkd fail in case nlst doesn't work #4695 --- ext/toolchain/ftputil.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/toolchain/ftputil.py b/ext/toolchain/ftputil.py index aef8363e..3351f6b4 100644 --- a/ext/toolchain/ftputil.py +++ b/ext/toolchain/ftputil.py @@ -44,7 +44,9 @@ class FtpUploader: def changeDir(self, ftp, dir): if dir not in ftp.nlst(): print "Creating dir '%s'" % dir - ftp.mkd(dir) + try: + ftp.mkd(dir) + except: print "Changing to dir '%s'" % dir ftp.cwd(dir)