Vinzenz Feenstra has uploaded a new change for review. Change subject: Fix username handling on Windows ......................................................................
Fix username handling on Windows We forcibly encoded the unicode string to UTF-8 right after retrieval which broke the encoding later on. This patch fixes this issue. Change-Id: I65b33e4f38f801f1770cf94a5ed36234c2fae90d Bug-Url: https://bugzilla.redhat.com/1010201 Signed-off-by: Vinzenz Feenstra <vfeen...@redhat.com> --- M ovirt-guest-agent/GuestAgentWin32.py M ovirt-guest-agent/OVirtAgentLogic.py 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-guest-agent refs/changes/35/31535/1 diff --git a/ovirt-guest-agent/GuestAgentWin32.py b/ovirt-guest-agent/GuestAgentWin32.py index 8689a90..94b18b6 100644 --- a/ovirt-guest-agent/GuestAgentWin32.py +++ b/ovirt-guest-agent/GuestAgentWin32.py @@ -432,7 +432,7 @@ except: logging.exception("Error retrieving active user name.") logging.debug("Activer user: %s", user) - return user.encode('utf8') + return user def getDisksUsage(self): usages = list() diff --git a/ovirt-guest-agent/OVirtAgentLogic.py b/ovirt-guest-agent/OVirtAgentLogic.py index 21acc3a..5cfcfff 100644 --- a/ovirt-guest-agent/OVirtAgentLogic.py +++ b/ovirt-guest-agent/OVirtAgentLogic.py @@ -329,7 +329,7 @@ self._send('fqdn', {'fqdn': self.dr.getFQDN()}) def sendUserInfo(self, force=False): - cur_user = str(self.dr.getActiveUser()) + cur_user = self.dr.getActiveUser() logging.debug("AgentLogicBase::sendUserInfo - cur_user = '%s'" % (cur_user)) if cur_user != self.activeUser or force: -- To view, visit http://gerrit.ovirt.org/31535 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I65b33e4f38f801f1770cf94a5ed36234c2fae90d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-guest-agent Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra <vfeen...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches