/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 setup.py

  • Committer: Jelmer Vernooij
  • Date: 2018-03-25 12:47:13 UTC
  • mfrom: (6928 work)
  • mto: (6940.2.6 base)
  • mto: This revision was merged to the branch mainline in revision 6941.
  • Revision ID: jelmer@jelmer.uk-20180325124713-dq64vm9bhch1gjow
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
def get_long_description():
25
25
    dirname = os.path.dirname(__file__)
26
26
    readme = os.path.join(dirname, 'README')
27
 
    f = open(readme, 'rb')
28
 
    try:
 
27
    with open(readme, 'rb') as f:
29
28
        return f.read()
30
 
    finally:
31
 
        f.close()
32
29
 
33
30
 
34
31
##
136
133
                args = self._win_batch_args()
137
134
                batch_str = "@%s %s %s" % (python_exe, script_path, args)
138
135
                batch_path = os.path.join(self.install_dir, "brz.bat")
139
 
                f = file(batch_path, "w")
140
 
                f.write(batch_str)
141
 
                f.close()
 
136
                with file(batch_path, "w") as f:
 
137
                    f.write(batch_str)
142
138
                print(("Created: %s" % batch_path))
143
139
            except Exception:
144
140
                e = sys.exc_info()[1]