Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.2, 1.9.3, and 2.0

cmdui: catch AttributeErrors more generally

Changeset 0b1aaf7b67a6

Parent 181aaa4892a2

by Steve Borho

Changes to one file · Browse files at 0b1aaf7b67a6 Showing diff from parent 181aaa4892a2 Diff from another changeset...

 
174
175
176
177
178
 
 
179
180
181
182
183
 
 
 
 
184
185
186
187
188
189
190
191
 
 
192
193
194
195
196
 
 
 
 
197
198
199
 
174
175
176
 
 
177
178
179
 
 
 
 
180
181
182
183
184
185
186
187
188
189
 
 
190
191
192
 
 
 
 
193
194
195
196
197
198
199
@@ -174,26 +174,26 @@
  def cancel(self):   '''Cancel running Mercurial command'''   if self.is_running(): - if self.extproc: - try: + try: + if self.extproc:   self.extproc.close() - except AttributeError: - pass - elif self.thread: - self.thread.abort() + elif self.thread: + self.thread.abort() + except AttributeError: + pass   self.commandCanceling.emit()     def set_stbar(self, stbar):   self.stbar = stbar     def is_running(self): - if self.extproc: - try: + try: + if self.extproc:   return self.extproc.state() != QProcess.NotRunning - except AttributeError: - return False - elif self.thread: - return self.thread.isRunning() + elif self.thread: + return self.thread.isRunning() + except AttributeError: + pass   return False     def get_rawoutput(self):