~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/atomicfile.py

  • Committer: Mark Hammond
  • Date: 2008-08-16 04:00:54 UTC
  • mto: This revision was merged to the branch mainline in revision 3686.
  • Revision ID: mhammond@skippinet.com.au-20080816040054-7ptlmd3zbmxf9yig
Add osutils.get_host_name() to return a unicode hostname to prevent
non-ascii host names from causing Unicode error.  Fixes bzr/+bug/256550

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
        self._fd = None
54
54
 
55
55
        if _hostname is None:
56
 
            _hostname = socket.gethostname()
 
56
            _hostname = osutils.get_host_name()
57
57
 
58
58
        self.tmpfilename = '%s.%d.%s.tmp' % (filename, _pid, _hostname)
59
59