aboutsummaryrefslogtreecommitdiffstats
path: root/lvc/windows/autoupdate.py
diff options
context:
space:
mode:
Diffstat (limited to 'lvc/windows/autoupdate.py')
-rw-r--r--lvc/windows/autoupdate.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/lvc/windows/autoupdate.py b/lvc/windows/autoupdate.py
index 834a45f..ba2e271 100644
--- a/lvc/windows/autoupdate.py
+++ b/lvc/windows/autoupdate.py
@@ -77,7 +77,7 @@ def open_or_create_key(key, subkey, write_access=False):
sam = winreg.KEY_READ
try:
return winreg.OpenKey(key, subkey, 0, sam)
- except OSError, e:
+ except OSError as e:
if e.errno == 2:
# Not Found error. We should create the key
return winreg.CreateKey(key, subkey)
@@ -88,14 +88,14 @@ def open_or_create_key(key, subkey, write_access=False):
def check_for_updates_set(winsparkle_key):
try:
winreg.QueryValueEx(winsparkle_key, "CheckForUpdates")
- except OSError, e:
- if e.errno == 2:
- # not found error.
- return False
- else:
- raise
- else:
- return True
+ except OSError as e:
+ if e.errno == 2:
+ # not found error.
+ return False
+ else:
+ raise
+ else:
+ return True
def set_default_check_for_updates(winsparkle_key):