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 00D4913800E for ; Mon, 30 Jul 2012 08:55:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B848DE06D7; Mon, 30 Jul 2012 08:52:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 89106E06D7 for ; Mon, 30 Jul 2012 08:52:47 +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 D4B1B1B4020 for ; Mon, 30 Jul 2012 08:52:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 4F224E5444 for ; Mon, 30 Jul 2012 08:52:44 +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: <1343149089.b568e1b218a2ed83dc0ae36bb4a3326b19078034.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: b568e1b218a2ed83dc0ae36bb4a3326b19078034 X-VCS-Branch: master Date: Mon, 30 Jul 2012 08:52:44 +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: 2ae27e48-379c-4eb3-b1b9-4bf430eb4744 X-Archives-Hash: 33156090d385fcdb6485f83fd71ccd7d commit: b568e1b218a2ed83dc0ae36bb4a3326b19078034 Author: André Erdmann mailerd de> AuthorDate: Tue Jul 24 16:58:09 2012 +0000 Commit: André Erdmann mailerd de> CommitDate: Tue Jul 24 16:58:09 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=b568e1b2 stop thread when queue is empty --- roverlay/overlay/category.py | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/roverlay/overlay/category.py b/roverlay/overlay/category.py index a0b1607..2d66246 100644 --- a/roverlay/overlay/category.py +++ b/roverlay/overlay/category.py @@ -145,19 +145,18 @@ class Category ( object ): * q -- queue * write_kw -- keywords for write(...) """ - try: - while not q.empty(): - try: - pkg = q.get_nowait() - # remove manifest writing from threaded writing since it's - # single-threaded - pkg.write ( write_manifest=False, **write_kw ) - #except ( Exception, KeyboardInterrupt ) as e: - except Exception as e: - # FIXME: reintroduce RERAISE - self.logger.exception ( e ) - except queue.Empty: - pass + while not q.empty(): + try: + pkg = q.get_nowait() + # remove manifest writing from threaded writing since it's + # single-threaded + pkg.write ( write_manifest=False, **write_kw ) + except queue.Empty: + break + #except ( Exception, KeyboardInterrupt ) as e: + except Exception as e: + # FIXME: reintroduce RERAISE + self.logger.exception ( e ) # --- end of run_write_queue (...) --- if len ( self._subdirs ) == 0: return 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 9C0DE13800E for ; Tue, 24 Jul 2012 17:00:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9B0DFE071E; Tue, 24 Jul 2012 16:59:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 708C0E071E for ; Tue, 24 Jul 2012 16:59:53 +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 C9ED81B4544 for ; Tue, 24 Jul 2012 16:59:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 634CBE5445 for ; Tue, 24 Jul 2012 16:59:50 +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: <1343149089.b568e1b218a2ed83dc0ae36bb4a3326b19078034.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:overlay_wip 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: b568e1b218a2ed83dc0ae36bb4a3326b19078034 X-VCS-Branch: overlay_wip Date: Tue, 24 Jul 2012 16:59:50 +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: b883be3c-c713-47f3-bc68-555909413b1e X-Archives-Hash: 604351197486913f2cc1c7b927dcb0fa Message-ID: <20120724165950._A3SV0_5s1dZcs0-lCeZOX3b5zXKapuzxwpj03UGG84@z> commit: b568e1b218a2ed83dc0ae36bb4a3326b19078034 Author: André Erdmann mailerd de> AuthorDate: Tue Jul 24 16:58:09 2012 +0000 Commit: André Erdmann mailerd de> CommitDate: Tue Jul 24 16:58:09 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=b568e1b2 stop thread when queue is empty --- roverlay/overlay/category.py | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/roverlay/overlay/category.py b/roverlay/overlay/category.py index a0b1607..2d66246 100644 --- a/roverlay/overlay/category.py +++ b/roverlay/overlay/category.py @@ -145,19 +145,18 @@ class Category ( object ): * q -- queue * write_kw -- keywords for write(...) """ - try: - while not q.empty(): - try: - pkg = q.get_nowait() - # remove manifest writing from threaded writing since it's - # single-threaded - pkg.write ( write_manifest=False, **write_kw ) - #except ( Exception, KeyboardInterrupt ) as e: - except Exception as e: - # FIXME: reintroduce RERAISE - self.logger.exception ( e ) - except queue.Empty: - pass + while not q.empty(): + try: + pkg = q.get_nowait() + # remove manifest writing from threaded writing since it's + # single-threaded + pkg.write ( write_manifest=False, **write_kw ) + except queue.Empty: + break + #except ( Exception, KeyboardInterrupt ) as e: + except Exception as e: + # FIXME: reintroduce RERAISE + self.logger.exception ( e ) # --- end of run_write_queue (...) --- if len ( self._subdirs ) == 0: return