/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

  • Committer: Robey Pointer
  • Date: 2006-09-03 00:13:54 UTC
  • mto: This revision was merged to the branch mainline in revision 1996.
  • Revision ID: robey@lag.net-20060903001354-1f596a529c9c4934
remove usage of hasattr

Show diffs side-by-side

added added

removed removed

Lines of Context:
648
648
        """
649
649
        # paramiko seems to generate detailless errors.
650
650
        self._translate_error(e, path, raise_generic=False)
651
 
        if hasattr(e, 'args'):
 
651
        if getattr(e, 'args', None) != None:
652
652
            if (e.args == ('No such file or directory',) or
653
653
                e.args == ('No such file',)):
654
654
                raise NoSuchFile(path, str(e) + more_info)
658
658
            if (e.args == ('Failure',)):
659
659
                raise failure_exc(path, str(e) + more_info)
660
660
            mutter('Raising exception with args %s', e.args)
661
 
        if hasattr(e, 'errno'):
 
661
        if getattr(e, 'errno', None) != None:
662
662
            mutter('Raising exception with errno %s', e.errno)
663
663
        raise e
664
664