def progress_thread_run(func):
    def newfunc(self, *args, **kwargs):
        """Wrapper function."""
        # pylint: disable=W0212
        try:
            func(self, *args, **kwargs)
        finally:
            gtk.gdk.threads_enter()
            if self._pdialog.top_widget:
                self._pdialog.top_widget.destroy()
            print _("Thread done")
            gtk.gdk.threads_leave()
    return newfunc
Decorator for the working functions.
dataset/ETHPy150Open thesamet/webilder/src/webilder/progress_dialog.py/progress_thread_run