~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/version.py

  • Committer: Patch Queue Manager
  • Date: 2013-07-14 10:59:28 UTC
  • mfrom: (6579.2.1 1195783-platform-utf8)
  • Revision ID: pqm@pqm.ubuntu.com-20130714105928-78j748r1djstxmo1
(vila) Make 'bzr version' support utf8 platform names. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from __future__ import absolute_import
20
20
 
21
21
import os
 
22
import platform
22
23
import sys
23
24
 
24
25
import bzrlib
32
33
 
33
34
 
34
35
def show_version(show_config=True, show_copyright=True, to_file=None):
35
 
    import platform
36
 
 
37
36
    if to_file is None:
38
37
        to_file = sys.stdout
39
38
    to_file.write("Bazaar (bzr) %s\n" % bzrlib.__version__)
66
65
 
67
66
    to_file.write("  Python standard library:" + ' ')
68
67
    to_file.write(os.path.dirname(os.__file__) + '\n')
69
 
    to_file.write("  Platform: %s\n" % platform.platform(aliased=1))
 
68
    to_file.write("  Platform: %s\n"
 
69
                  % platform.platform(aliased=1).decode('utf-8'))
70
70
    to_file.write("  bzrlib: ")
71
71
    if len(bzrlib.__path__) > 1:
72
72
        # print repr, which is a good enough way of making it clear it's