Change in vdsm[master]: Fix some pep8 errors

smizrahi at redhat.com smizrahi at redhat.com
Thu Sep 27 10:26:42 UTC 2012


Saggi Mizrahi has uploaded a new change for review.

Change subject: Fix some pep8 errors
......................................................................

Fix some pep8 errors

Change-Id: I417f646b8fc1f242f3d5c91fdf0d7e79600552e9
Signed-off-by: Saggi Mizrahi <smizrahi at redhat.com>
---
M vdsm/storage/misc.py
M vdsm/storage/sdc.py
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/37/8237/1

diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
index bb5bfd4..b2dc448 100644
--- a/vdsm/storage/misc.py
+++ b/vdsm/storage/misc.py
@@ -208,7 +208,7 @@
 
     (out, err) = p.communicate(data)
 
-    if out == None:
+    if out is None:
         # Prevent splitlines() from barfing later on
         out = ""
 
@@ -644,7 +644,7 @@
 
         # Handle reacquiring lock in the same thread
         if currentThread in self._holdingThreads:
-            if self._currentState == False and exclusive:
+            if not self._currentState and exclusive:
                 raise RuntimeError("Lock promotion is forbidden.")
 
             self._holdingThreads[currentThread] += 1
@@ -1071,7 +1071,7 @@
         self.__funcParent = None
 
     def __call__(self, *args, **kwargs):
-        if self.__funcParent == None:
+        if self.__funcParent is None:
             if (hasattr(self.__func, "func_code") and
                     self.__func.func_code.co_varnames == 'self'):
                 self.__funcParent = args[0].__class__.__name__
@@ -1211,7 +1211,7 @@
                         continue
                 try:
                     self._log.debug("Calling registered method `%s`",
-                            func.func_name if hasattr(func, "func_name") \
+                            func.func_name if hasattr(func, "func_name")
                                     else str(func))
                     if self._sync:
                         func(*args, **kwargs)
diff --git a/vdsm/storage/sdc.py b/vdsm/storage/sdc.py
index 2ec09b6..f93d5dc 100644
--- a/vdsm/storage/sdc.py
+++ b/vdsm/storage/sdc.py
@@ -77,7 +77,7 @@
         self.storageStale = False
 
     def _getDomainFromCache(self, sdUUID):
-        if self.storageStale == True:
+        if self.storageStale is True:
             return None
         try:
             return self.__proxyCache[sdUUID]()


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I417f646b8fc1f242f3d5c91fdf0d7e79600552e9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi at redhat.com>


More information about the vdsm-patches mailing list