diff --git a/generator/python.ml b/generator/python.ml index 70dc076a5..9744b8f1c 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -738,7 +738,7 @@ class GuestFS(object): raise ClosedHandle(\"GuestFS: method called on closed handle\") def _maybe_convert_to_dict(self, r): - if self._python_return_dict == True: + if self._python_return_dict: r = dict(r) return r diff --git a/python/t/tests_helper.py b/python/t/tests_helper.py index 8493c40e8..4ae1375ae 100644 --- a/python/t/tests_helper.py +++ b/python/t/tests_helper.py @@ -39,7 +39,7 @@ def skipUnlessLibvirtHasCPointer(): return unittest.skip("could not import libvirt") # Check we're using the version of libvirt-python that has # c_pointer() methods. - if not "c_pointer" in dir(libvirt.open(None)): + if "c_pointer" not in dir(libvirt.open(None)): return unittest.skip("libvirt-python doesn't support c_pointer()") return lambda func: func