[PATCH] fix broken ui Blinkenlights in multi-threaded mode

Daniel Shahaf d.s at daniel.shahaf.name
Mon Jun 6 11:34:19 BST 2011


Haven't looked at the patch, but on IRC I reported

AttributeError: 'InstanceLimitedThread' has no attribute 'threadid'

using then-current (midnight) tip of master, and Sebastian asked me to
report that on this thread.

(I've since reverted to v6.3.3 tag)

Daniel


Nicolas Sebrecht wrote on Tue, May 17, 2011 at 18:27:03 +0200:
> This is a regression introduced by commit d5493fe89420
> [threadutil: explicitly import get_ident from thread].
> 
> The threadid attribute was wrongly removed from the ExitNotifyThread class.
> Restore it.
> 
> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev at laposte.net>
> ---
>  offlineimap/threadutil.py |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/offlineimap/threadutil.py b/offlineimap/threadutil.py
> index 155a563..bb3b63c 100644
> --- a/offlineimap/threadutil.py
> +++ b/offlineimap/threadutil.py
> @@ -134,6 +134,7 @@ class ExitNotifyThread(Thread):
>      exited and to provide for the ability for it to find out why."""
>      def run(self):
>          global exitthreads, profiledir
> +        self.threadid = get_ident()
>          try:
>              if not profiledir:          # normal case
>                  Thread.run(self)
> @@ -148,7 +149,7 @@ class ExitNotifyThread(Thread):
>                  except SystemExit:
>                      pass
>                  prof.dump_stats( \
> -                            profiledir + "/" + str(get_ident()) + "_" + \
> +                            profiledir + "/" + str(self.threadid) + "_" + \
>                              self.getName() + ".prof")
>          except:
>              self.setExitCause('EXCEPTION')
> -- 
> 1.7.5.1.354.g761178
> 
> 
> _______________________________________________
> OfflineIMAP-project mailing list
> OfflineIMAP-project at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/offlineimap-project
> 
> OfflineIMAP homepage: http://software.complete.org/offlineimap




More information about the OfflineIMAP-project mailing list