~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/atomicfile.py

  • Committer: Martin Packman
  • Date: 2011-12-05 14:21:55 UTC
  • mfrom: (6015.44.9 2.4)
  • mto: This revision was merged to the branch mainline in revision 6345.
  • Revision ID: martin.packman@canonical.com-20111205142155-t7s4lr5aau50dp8i
Merge 2.4 into bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
            # the common case is that we won't, though.
79
79
            st = os.fstat(self._fd)
80
80
            if stat.S_IMODE(st.st_mode) != new_mode:
81
 
                os.chmod(self.tmpfilename, new_mode)
 
81
                osutils.chmod_if_possible(self.tmpfilename, new_mode)
82
82
 
83
83
    def __repr__(self):
84
84
        return '%s(%r)' % (self.__class__.__name__,