~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Robert Collins
  • Date: 2005-09-29 02:36:53 UTC
  • Revision ID: robertc@robertcollins.net-20050929023653-3db4f5e5516458cd
guard against broken IOError subclasses in check_format

Show diffs side-by-side

added added

removed removed

Lines of Context:
395
395
        try:
396
396
            fmt = self.controlfile('branch-format', 'r').read()
397
397
        except IOError, e:
398
 
            if e.errno == errno.ENOENT:
399
 
                raise NotBranchError(self.base)
 
398
            if hasattr(e, 'errno'):
 
399
                if e.errno == errno.ENOENT:
 
400
                    raise NotBranchError(self.base)
 
401
                else:
 
402
                    raise
400
403
            else:
401
404
                raise
402
405