diff options
| author | Nick Mathewson <nickm@torproject.org> | 2008-11-20 22:03:50 +0000 | 
|---|---|---|
| committer | Nick Mathewson <nickm@torproject.org> | 2008-11-20 22:03:50 +0000 | 
| commit | 3b50b5c9971acfcc49e11a732061ce1414211ab2 (patch) | |
| tree | f0bc670b8de1944e5fb90053b97623ee2d4861de /lib/thandy/util.py | |
| parent | b6380e73f9800c7d14f8379248592b23d1a527d5 (diff) | |
Fall back to using built-in db rather than registry when some clever person decides to try installing a win32 binary on their linux box.
git-svn-id: file:///home/or/svnrepo/updater/trunk@17340 55e972cd-5a19-0410-ae62-a4d7a52db4cd
Diffstat (limited to 'lib/thandy/util.py')
| -rw-r--r-- | lib/thandy/util.py | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/lib/thandy/util.py b/lib/thandy/util.py index ff617ae..ad69fa0 100644 --- a/lib/thandy/util.py +++ b/lib/thandy/util.py @@ -109,8 +109,13 @@ def randChooseWeighted(lst):      return lst[-1][1] +class NoRegistry(thandy.Exception): +    pass +  def getRegistryValue(keyname):      """Read the contents of a Windows registry key from a given base.""" +    if _winreg is None: +        raise NoRegistry()      hkey, rest = keyname.split("\\", 1)      key, value = rest.rsplit("\\", 1) | 
