~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Lib/ftplib.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-04-08 02:29:05 UTC
  • mto: (10.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 23.
  • Revision ID: james.westby@ubuntu.com-20090408022905-xa5zbe8821m2o77o
Tags: upstream-2.6.2~rc1
ImportĀ upstreamĀ versionĀ 2.6.2~rc1

Show diffs side-by-side

added added

removed removed

Lines of Context:
221
221
    def voidresp(self):
222
222
        """Expect a response beginning with '2'."""
223
223
        resp = self.getresp()
224
 
        if resp[0] != '2':
 
224
        if resp[:1] != '2':
225
225
            raise error_reply, resp
226
226
        return resp
227
227
 
520
520
        resp = self.sendcmd('DELE ' + filename)
521
521
        if resp[:3] in ('250', '200'):
522
522
            return resp
523
 
        elif resp[:1] == '5':
524
 
            raise error_perm, resp
525
523
        else:
526
524
            raise error_reply, resp
527
525