Vinzenz Feenstra has uploaded a new change for review.

Change subject: win32: Set registry value with SetValueEx not SetValue
......................................................................

win32: Set registry value with SetValueEx not SetValue

_winreg.SetValue only allows to set the default value on a subkey
SetValueEx lets one specify the value name and the value itself.

Change-Id: I51d70381de43d62e96f9f24de60bdf0226e20f54
Bug-Url: https://bugzilla.redhat.com/1158470
Signed-off-by: Vinzenz Feenstra <[email protected]>
---
M ovirt-guest-agent/GuestAgentWin32.py
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-guest-agent 
refs/changes/63/35163/1

diff --git a/ovirt-guest-agent/GuestAgentWin32.py 
b/ovirt-guest-agent/GuestAgentWin32.py
index 3c3f86e..e9d5a59 100644
--- a/ovirt-guest-agent/GuestAgentWin32.py
+++ b/ovirt-guest-agent/GuestAgentWin32.py
@@ -210,8 +210,8 @@
             except OSError:
                 # Expected to happen if it does not exist
                 old = (None, None)
-            _winreg.SetValue(handle, 'SoftwareSASGeneration',
-                             _winreg.REG_DWORD, value)
+            _winreg.SetValueEx(handle, 'SoftwareSASGeneration', 0,
+                               _winreg.REG_DWORD, value)
             return old[0]
         return None
 
@@ -230,7 +230,10 @@
         BUFSIZE = 1024
         RETIRES = 3
         try:
-            self._performSAS()
+            try:
+                self._performSAS()
+            except Exception:
+                logging.warning("Failed to perform SAS", exc_info=True)
             retries = 1
             while retries <= RETIRES:
                 try:


-- 
To view, visit http://gerrit.ovirt.org/35163
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51d70381de43d62e96f9f24de60bdf0226e20f54
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-guest-agent
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to