/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/builtins.py

  • Committer: Jelmer Vernooij
  • Date: 2018-02-18 19:18:40 UTC
  • mto: This revision was merged to the branch mainline in revision 6928.
  • Revision ID: jelmer@jelmer.uk-20180218191840-2wezg20u9ffbfmed
Fix more bees, use with rather than try/finally for some files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3700
3700
        def get_message(commit_obj):
3701
3701
            """Callback to get commit message"""
3702
3702
            if file:
3703
 
                f = open(file)
3704
 
                try:
 
3703
                with open(file) as f:
3705
3704
                    my_message = f.read().decode(osutils.get_user_encoding())
3706
 
                finally:
3707
 
                    f.close()
3708
3705
            elif message is not None:
3709
3706
                my_message = message
3710
3707
            else: