~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

(jameinel) Fix file open flags for python2.7 (Martin [gz])

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
from bzrlib.lazy_import import lazy_import
22
22
lazy_import(globals(), """
23
 
import codecs
24
23
import cStringIO
25
24
import sys
26
25
import time
3135
3134
        def get_message(commit_obj):
3136
3135
            """Callback to get commit message"""
3137
3136
            if file:
3138
 
                f = codecs.open(file, 'rt', osutils.get_user_encoding())
 
3137
                f = open(file)
3139
3138
                try:
3140
 
                    my_message = f.read()
 
3139
                    my_message = f.read().decode(osutils.get_user_encoding())
3141
3140
                finally:
3142
3141
                    f.close()
3143
3142
            elif message is not None: