/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 tools/win32/brz-win32-bdist-postinstall.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-08 23:30:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6690.
  • Revision ID: jelmer@jelmer.uk-20170608233031-3qavls2o7a1pqllj
Update imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
                         batch_str)
79
79
 
80
80
        batch_path = os.path.join(scripts_dir, "brz.bat")
81
 
        with open(batch_path, "w") as f:
82
 
            f.write(batch_str)
83
 
        # registering manually created files for auto-deinstallation procedure
84
 
        file_created(batch_path)
 
81
        f = file(batch_path, "w")
 
82
        f.write(batch_str)
 
83
        f.close()
 
84
        file_created(batch_path)        # registering manually created files for
 
85
                                        # auto-deinstallation procedure
85
86
        ##
86
87
        # inform user where batch launcher is.
87
88
        print("Created:", batch_path)
93
94
    # use bdist_wininst builtins to create a shortcut.
94
95
    # CSIDL_COMMON_PROGRAMS only available works on NT/2000/XP, and
95
96
    # will fail there if the user has no admin rights.
96
 
    if get_root_hkey() == _winreg.HKEY_LOCAL_MACHINE:
 
97
    if get_root_hkey()==_winreg.HKEY_LOCAL_MACHINE:
97
98
        try:
98
99
            fldr = get_special_folder_path("CSIDL_COMMON_PROGRAMS")
99
100
        except OSError: