@@ -95,20 +95,20 @@ def version(self):
9595 return None
9696 except Exception , e :
9797 raise OperationError ("Could not gather ZBackup version: %s" % e )
98-
98+
9999 def has_zbackup (self ):
100100 if self .version ():
101- return True
101+ return True
102102 return False
103103
104104 def close (self , exit_code = None , frame = None ):
105105 del exit_code
106106 del frame
107107 if not self .stopped :
108- if self ._zbackup and self ._zbackup .poll () == None :
108+ if self ._zbackup and self ._zbackup .poll () is None :
109109 logging .debug ("Stopping running ZBackup command" )
110110 self ._zbackup .terminate ()
111- if self ._tar and self ._tar .poll () == None :
111+ if self ._tar and self ._tar .poll () is None :
112112 logging .debug ("Stopping running ZBackup tar command" )
113113 self ._tar .terminate ()
114114 self .stopped = True
@@ -131,12 +131,12 @@ def wait(self):
131131 self .poll ()
132132 if tar_done :
133133 self ._zbackup .communicate ()
134- if self ._zbackup .poll () != None :
134+ if self ._zbackup .poll () is not None :
135135 logging .info ("ZBackup completed successfully with exit code: %i" % self ._zbackup .returncode )
136136 if self ._zbackup .returncode != 0 :
137137 raise OperationError ("ZBackup exited with code: %i!" % self ._zbackup .returncode )
138138 break
139- elif self ._tar .poll () != None :
139+ elif self ._tar .poll () is not None :
140140 if self ._tar .returncode == 0 :
141141 logging .debug ("ZBackup tar command completed successfully with exit code: %i" % self ._tar .returncode )
142142 tar_done = True
@@ -160,9 +160,9 @@ def run(self):
160160 lock = Lock (self .zbackup_lock )
161161 lock .acquire ()
162162 try :
163- logging .info ("Starting ZBackup version: %s (options: compression=%s, encryption=%s, threads=%i, cache_mb=%i)" %
164- ( self .version (), self .compression (), self .encrypted , self .threads (), self .zbackup_cache_mb )
165- )
163+ logging .info ("Starting ZBackup version: %s (options: compression=%s, encryption=%s, threads=%i, cache_mb=%i)" % (
164+ self .version (), self .compression (), self .encrypted , self .threads (), self .zbackup_cache_mb
165+ ))
166166 self .running = True
167167 try :
168168 for sub_dir in os .listdir (self .backup_dir ):
0 commit comments