Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.089 X-Spam-Evidence: '*H*': 0.83; '*S*': 0.00; '%s"': 0.09; 'try:': 0.09; 'print': 0.22; 'message-id:@mail.gmail.com': 0.30; 'file': 0.32; 'except': 0.35; 'skip:s 30': 0.35; 'received:google.com': 0.35; 'skip:& 10': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=L/7g66r5QVKlnOh5kZ2hrtJMtzIXecfyCT7jvRhNj/c=; b=J3E97WFiGgcaUHB0oft1Y+ZJlc4sFM2ab9R+xpBGqg/cYmj6gvShxicRAUR1e/8wwe W5ZcCXXTLcXoWxSlwSXjvHmbw5Lz5AuQNaI1rMFgCuMG/aIM/C2rSxY3M9Ufi6bsnPWL ZW0DQrUuJfXPShAInQ2rWEWLdKEWvkjmDBz8+fAxeARnzSS9nAPBPAokWywWnsxvavfW cJDGXa5M7Flpk8Xeg/IQusCh7lYwMQGD7yeS0n3wWxKEVNiWButTWn4oAP2qMXilk4Bf i7RXsJelRaDIcL2Th14M9PC40yO3k8f0eAl2HZpjqEt5StLv43uirQmtyUILtbabEpKr W4RA== MIME-Version: 1.0 X-Received: by 10.15.36.133 with SMTP id i5mr17084829eev.149.1376135012463; Sat, 10 Aug 2013 04:43:32 -0700 (PDT) Date: Sat, 10 Aug 2013 15:43:32 +0400 Subject: Re: ftplib returns EOFError From: Dorian MJ To: python-list@python.org Content-Type: multipart/alternative; boundary=089e0168163494e24604e39666e0 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1376135444 news.xs4all.nl 15997 [2001:888:2000:d::a6]:46147 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:52302 --089e0168163494e24604e39666e0 Content-Type: text/plain; charset=ISO-8859-1 print "\t\tUploading file %s..." % newname try: self.ftp.storbinary("STOR %s" % newname, open(file)) except EOFError: # yep?? self.ftp.connect(self.ftpServ) # reconnecting self.ftp.login(ftpUser, ftpPass) self.ftp.storbinary("STOR %s" % newname, open(file)) print "\t\tFile %s uploaded" % newname --089e0168163494e24604e39666e0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
= print "\t\tUploading file %s..." % newname
try:
self.ftp.storbinary("STOR %s"= % newname, open(file))
except EOFError: = # yep??
sel= f.ftp.connect(self.ftpServ) # reconnecting
self.ftp.login(ftpUser, ftpPass)
self.ftp.storbin= ary("STOR %s" % newname, open(file))
print "\t\tFile %s uploaded" %= newname
--089e0168163494e24604e39666e0--