~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/win32utils.py

  • Committer: Alexander Belchenko
  • Date: 2007-08-11 05:44:04 UTC
  • mto: (2681.1.28 send-bundle)
  • mto: This revision was merged to the branch mainline in revision 2736.
  • Revision ID: bialix@ukr.net-20070811054404-q4h3kkel0p6m3urz
move import _winreg into function get_app_path to avoid ImportError on non-win32 platforms

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import os
23
23
import struct
24
24
import sys
25
 
import _winreg
26
25
 
27
26
 
28
27
# Windows version
300
299
    :return:    full path to aplication executable from registry,
301
300
                or appname itself if nothing found.
302
301
    """
 
302
    import _winreg
303
303
    try:
304
304
        hkey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,
305
305
                               r'SOFTWARE\Microsoft\Windows'