mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 23:02:25 +00:00
Use preferred exception raising syntax.
Also, make the `WindowsError` class "reachable".
This commit is contained in:
parent
b6d33c92ff
commit
3705264740
@ -5,9 +5,9 @@ _AMD_KEY = r"Software\Allmydata"
|
||||
_BDIR_KEY = 'Base Dir Path'
|
||||
|
||||
if sys.platform not in ('win32'):
|
||||
raise ImportError, "registry cannot be used on non-windows systems"
|
||||
class WindowsError(Exception): # stupid voodoo to appease pyflakes
|
||||
pass
|
||||
raise ImportError("registry cannot be used on non-windows systems")
|
||||
|
||||
def get_registry_setting(key, name, _topkey=None):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user