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

cmdui: check whether self.pmon is not None

self.pmon is initialized with None in __init__().

Changeset 8f7ce6cd8344

Parent f693fbcda0e8

by Yuki KODAMA

Changes to one file · Browse files at 8f7ce6cd8344 Showing diff from parent f693fbcda0e8 Diff from another changeset...

 
120
121
122
123
 
124
125
126
 
135
136
137
138
 
139
140
141
 
144
145
146
147
 
148
149
150
 
167
168
169
170
 
171
172
173
 
120
121
122
 
123
124
125
126
 
135
136
137
 
138
139
140
141
 
144
145
146
 
147
148
149
150
 
167
168
169
 
170
171
172
173
@@ -120,7 +120,7 @@
  self.thread.commandFinished.connect(self.command_finished)   self.thread.outputReceived.connect(self.output_received)   self.thread.errorReceived.connect(self.error_received) - if hasattr(self, 'pmon'): + if self.pmon:   self.thread.progressReceived.connect(self.progress_received)   self.thread.start()   @@ -135,7 +135,7 @@
  ### Signal Handlers ###     def command_started(self): - if hasattr(self, 'pmon'): + if self.pmon:   self.pmon.set_text(_('Running...'))   self.pmon.unknown_progress()   @@ -144,7 +144,7 @@
  def command_finished(self, wrapper):   ret = wrapper.data   - if hasattr(self, 'pmon'): + if self.pmon:   if ret is None:   self.pmon.clear_progress()   if self.pmon.pbar.maximum() == 0: # busy indicator @@ -167,7 +167,7 @@
  self.commandFinished.emit(wrapper)     def command_canceling(self): - if hasattr(self, 'pmon'): + if self.pmon:   self.pmon.set_text(_('Canceling...'))   self.pmon.unknown_progress()