From d79f18382631a97f85ccc3ee4402597f4339c5ae Mon Sep 17 00:00:00 2001 From: FriendsOfGalaxy <48480506+FriendsOfGalaxy@users.noreply.github.com> Date: Mon, 4 Nov 2019 12:49:17 +0100 Subject: [PATCH] Fix RegistryMonitor.is_updated method --- src/galaxy/registry_monitor.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/galaxy/registry_monitor.py b/src/galaxy/registry_monitor.py index 52c0fec..1396535 100644 --- a/src/galaxy/registry_monitor.py +++ b/src/galaxy/registry_monitor.py @@ -1,4 +1,6 @@ import sys + + if sys.platform == "win32": import logging import ctypes @@ -76,11 +78,10 @@ class RegistryMonitor: if self._key is None: self._open_key() - if self._key is None: - return False + if self._key is not None: + self._set_key_update_notification() - self._set_key_update_notification() - return True + return False def _set_key_update_notification(self): filter_ = REG_NOTIFY_CHANGE_NAME | REG_NOTIFY_CHANGE_LAST_SET