From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 6E5F913894A for ; Sat, 9 Feb 2013 20:45:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BD8C821C057; Sat, 9 Feb 2013 20:45:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4326221C057 for ; Sat, 9 Feb 2013 20:45:35 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4A82533E3B1 for ; Sat, 9 Feb 2013 20:45:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id AE6FBE409E for ; Sat, 9 Feb 2013 20:45:30 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1360440495.d21225c2eba72f010b9ca824db192f450895bc03.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/overlay/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/overlay/category.py X-VCS-Directories: roverlay/overlay/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: d21225c2eba72f010b9ca824db192f450895bc03 X-VCS-Branch: master Date: Sat, 9 Feb 2013 20:45:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 43bcf268-0308-413f-8370-13d40b28d6d2 X-Archives-Hash: 7be374f90d4fb9a3a20908f77d7ffe20 commit: d21225c2eba72f010b9ca824db192f450895bc03 Author: André Erdmann mailerd de> AuthorDate: Sat Feb 9 19:34:29 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Sat Feb 9 20:08:15 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=d21225c2 overlay/category: RERAISE with correct traceback self.RERAISE contains the exception info (as returned by sys.exc_info()) now --- roverlay/overlay/category.py | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/roverlay/overlay/category.py b/roverlay/overlay/category.py index 3a58367..4a03cce 100644 --- a/roverlay/overlay/category.py +++ b/roverlay/overlay/category.py @@ -16,6 +16,7 @@ __all__ = [ 'Category', ] import threading import os +import sys try: import queue @@ -206,9 +207,8 @@ class Category ( object ): pkg.write ( **write_kw ) except queue.Empty: break - except Exception as e: - #self.logger.exception ( e ) - self.RERAISE = e + except: + self.RERAISE = sys.exc_info() # --- end of run_write_queue (...) --- if len ( self._subdirs ) == 0: return @@ -257,15 +257,14 @@ class Category ( object ): for w in workers: w.start() for w in workers: w.join() - if hasattr ( self, 'RERAISE' ) and self.RERAISE is not None: - raise self.RERAISE + if hasattr ( self, 'RERAISE' ) and self.RERAISE: + raise self.RERAISE [0], self.RERAISE [1], self.RERAISE [2] self.remove_empty() # write manifest files # fixme: debug print if write_manifest and ( not manifest_threadsafe ): - #self.logger.info ( "Writing Manifest files for {}".format ( name ) ) print ( "Writing Manifest files ..." ) for package in self._subdirs.values(): package.write_manifest ( ignore_empty=True )