command:base: use is/is-not None instead of ==/!= None in setup_command.
authorW. Trevor King <wking@tremily.us>
Fri, 24 Aug 2012 13:35:40 +0000 (09:35 -0400)
committerW. Trevor King <wking@tremily.us>
Fri, 24 Aug 2012 13:35:40 +0000 (09:35 -0400)
More Pythonic.

libbe/command/base.py

index 54de8c279fb5df2c93b059564ddf66f058fd3d38..40e4bf999e8473cdfab60554f836a1d299a3ef63 100644 (file)
@@ -566,11 +566,11 @@ class UserInterface (object):
         return command.run(options, args)
 
     def setup_command(self, command):
-        if command.ui == None:
+        if command.ui is None:
             command.ui = self
-        if self.io != None:
+        if self.io is not None:
             self.io.setup_command(command)
-        if self.storage_callbacks != None:
+        if self.storage_callbacks is not None:
             self.storage_callbacks.setup_command(command)        
         command.restrict_file_access = self.restrict_file_access
         command._get_user_id = self._get_user_id