Vinzenz Feenstra has uploaded a new change for review. Change subject: Fixing pep8 errors ......................................................................
Fixing pep8 errors Change-Id: Ic7c9c31493926deb7ae4f11a0f0bc487b04a7365 Signed-off-by: Vinzenz Feenstra <[email protected]> --- M ovirt-guest-agent/GuestAgentLinux2.py M ovirt-guest-agent/GuestAgentWin32.py M ovirt-guest-agent/OVirtAgentLogic.py M tests/message_validator.py 4 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-guest-agent refs/changes/12/28012/1 diff --git a/ovirt-guest-agent/GuestAgentLinux2.py b/ovirt-guest-agent/GuestAgentLinux2.py index 93ec191..7734bdc 100644 --- a/ovirt-guest-agent/GuestAgentLinux2.py +++ b/ovirt-guest-agent/GuestAgentLinux2.py @@ -251,7 +251,7 @@ for mount in mounts: try: (device, path, fs) = mount.split()[:3] - if not fs in self.ignored_fs: + if fs not in self.ignored_fs: # path might include spaces. path = path.decode("string-escape") statvfs = os.statvfs(path) diff --git a/ovirt-guest-agent/GuestAgentWin32.py b/ovirt-guest-agent/GuestAgentWin32.py index cbfb730..60743d5 100644 --- a/ovirt-guest-agent/GuestAgentWin32.py +++ b/ovirt-guest-agent/GuestAgentWin32.py @@ -26,8 +26,8 @@ # _winreg.QueryValueEx and win32api.RegQueryValueEx don't support reading # Unicode strings from the registry (at least on Python 2.5.1). def QueryStringValue(hkey, name): - #if type(hkey) != type(PyHKEY): - # raise TypeError("1nd arg must be a PyHKEY.") + # if type(hkey) != type(PyHKEY): + # raise TypeError("1nd arg must be a PyHKEY.") if type(name) != type(unicode()): raise TypeError("2nd arg must be a unicode.") key_type = c_ulong(0) @@ -342,7 +342,7 @@ return retval def getAvailableRAM(self): - ## Returns the available physical memory (including the system cache). + # Returns the available physical memory (including the system cache). pi = get_perf_info() return str(int((pi.PhysicalAvailable * pi.PageSize) / (1024 ** 2))) diff --git a/ovirt-guest-agent/OVirtAgentLogic.py b/ovirt-guest-agent/OVirtAgentLogic.py index 126b0db..35d4265 100644 --- a/ovirt-guest-agent/OVirtAgentLogic.py +++ b/ovirt-guest-agent/OVirtAgentLogic.py @@ -300,7 +300,7 @@ % (safe_creds_repr(credentials))) self.commandHandler.login(credentials) elif command == 'refresh': - if not 'apiVersion' in args and self.dr.getAPIVersion() > 0: + if 'apiVersion' not in args and self.dr.getAPIVersion() > 0: logging.info('API versioning not supported by VDSM. Disabling ' 'versioning support.') self.dr.setAPIVersion(_DISABLED_API_VALUE) diff --git a/tests/message_validator.py b/tests/message_validator.py index 4cc751a..67d5e71 100644 --- a/tests/message_validator.py +++ b/tests/message_validator.py @@ -34,7 +34,7 @@ def assertIn(m, n): - if not m in n: + if m not in n: raise Exception("%s not in %s" % (m, str(n))) -- To view, visit http://gerrit.ovirt.org/28012 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic7c9c31493926deb7ae4f11a0f0bc487b04a7365 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
