/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 breezy/tests/features.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import sys
24
24
import tempfile
25
25
 
26
 
from breezy import (
 
26
from .. import (
27
27
    osutils,
28
28
    symbol_versioning,
29
29
    )
425
425
            os.close(fd)
426
426
            osutils.chmod_if_possible(name, write_perms)
427
427
 
428
 
            read_perms = os.stat(name).st_mode & 0777
 
428
            read_perms = os.stat(name).st_mode & 0o777
429
429
            os.unlink(name)
430
430
            return (write_perms == read_perms)
431
431
 
447
447
                stdout=subprocess.PIPE)
448
448
            proc.communicate()
449
449
            return True
450
 
        except OSError, e:
 
450
        except OSError as e:
451
451
            if e.errno == errno.ENOENT:
452
452
                # strace is not installed
453
453
                return False
468
468
            return False
469
469
        try:
470
470
            proc = subprocess.Popen(['attrib', '.'], stdout=subprocess.PIPE)
471
 
        except OSError, e:
 
471
        except OSError as e:
472
472
            return False
473
473
        return (0 == proc.wait())
474
474