|
174 |
# done :) |
174 |
# done :) |
175 |
self._finishedResult = True |
175 |
self._finishedResult = True |
176 |
return True |
176 |
return True |
177 |
except: |
|
|
178 |
msg = '%s\n%s: %s\n' % (''.join(traceback.format_tb(thread.exc_info[2])), thread.exc_info[0].__name__, str(thread.exc_info[1])) |
179 |
MODULE.warn( 'Exception during saving the settings: %s\n%s' % (result, msg) ) |
180 |
finally: |
177 |
finally: |
181 |
obj._finishedLock.release() |
178 |
obj._finishedLock.release() |
182 |
|
179 |
|
183 |
|
180 |
|
184 |
def _finished( thread, result ): |
181 |
def _finished( thread, result ): |
185 |
if isinstance( result, BaseException ): |
182 |
if isinstance( result, BaseException ): |
186 |
MODULE.warn( 'Exception during saving the settings: %s' % str( result ) ) |
183 |
msg = '%s\n%s: %s\n' % (''.join(traceback.format_tb(thread.exc_info[2])), thread.exc_info[0].__name__, str(thread.exc_info[1])) |
|
|
184 |
MODULE.warn( 'Exception during saving the settings: %s\n%s' % (result, msg) ) |
187 |
|
185 |
|
188 |
thread = notifier.threads.Simple( 'save', |
186 |
thread = notifier.threads.Simple( 'save', |
189 |
notifier.Callback( _thread, request, self ), _finished ) |
187 |
notifier.Callback( _thread, request, self ), _finished ) |
|
242 |
|
240 |
|
243 |
def _finished( thread, result ): |
241 |
def _finished( thread, result ): |
244 |
if isinstance( result, BaseException ): |
242 |
if isinstance( result, BaseException ): |
245 |
MODULE.warn( 'Exception during saving the settings: %s' % str( result ) ) |
243 |
msg = '%s\n%s: %s\n' % (''.join(traceback.format_tb(thread.exc_info[2])), thread.exc_info[0].__name__, str(thread.exc_info[1])) |
|
|
244 |
MODULE.warn( 'Exception during saving the settings: %s\n%s' % (result, msg) ) |
246 |
|
245 |
|
247 |
thread = notifier.threads.Simple( 'save', |
246 |
thread = notifier.threads.Simple( 'save', |
248 |
notifier.Callback( _thread, request, self, request.options.get('username'), request.options.get('password')),_finished ) |
247 |
notifier.Callback( _thread, request, self, request.options.get('username'), request.options.get('password')),_finished ) |