~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/version.py

  • Committer: Vincent Ladeuil
  • Date: 2013-07-13 22:35:15 UTC
  • mto: This revision was merged to the branch mainline in revision 6581.
  • Revision ID: v.ladeuil+lp@free.fr-20130713223515-wftce3su3nu2oov6
Support utf-8 platform names

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