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 EB2391381F3 for ; Thu, 29 Aug 2013 12:36:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DCDFFE0B71; Thu, 29 Aug 2013 12:36:37 +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 3E73AE0B6A for ; Thu, 29 Aug 2013 12:36:37 +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 31E6C33ED0E for ; Thu, 29 Aug 2013 12:36:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 0D038E546B for ; Thu, 29 Aug 2013 12:36:34 +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: <1377779367.dd5751a54bdeac73478f58f21ffdcff3d2ea9010.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/status.py X-VCS-Directories: roverlay/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: dd5751a54bdeac73478f58f21ffdcff3d2ea9010 X-VCS-Branch: master Date: Thu, 29 Aug 2013 12:36:34 +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: 7e8cadbb-6be6-4c21-ae7a-bce9ed6f7d92 X-Archives-Hash: 0baaa0077afb9c05aeb42797845f0a30 commit: dd5751a54bdeac73478f58f21ffdcff3d2ea9010 Author: André Erdmann mailerd de> AuthorDate: Thu Aug 29 12:29:27 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Thu Aug 29 12:29:27 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=dd5751a5 roverlay/status, ReferenceableDict: inherit Referenceable --- roverlay/status.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/roverlay/status.py b/roverlay/status.py index 595e8fb..7843380 100644 --- a/roverlay/status.py +++ b/roverlay/status.py @@ -28,6 +28,7 @@ import roverlay.runtime import roverlay.tools.shenv import roverlay.db.rrdtool import roverlay.util.common +import roverlay.util.objects import roverlay.stats.rating # temporary import @@ -74,11 +75,7 @@ class DBStats ( roverlay.stats.rating.RoverlayNumStatsRating ): # --- end of DBStats --- -class ReferenceableDict ( dict ): - - def ref ( self ): - return weakref.ref ( self ) - # --- end of ref (...) --- +class ReferenceableDict ( roverlay.util.objects.Referenceable, dict ): def sorted_items ( self, keysort=None ): if keysort is None: @@ -113,7 +110,7 @@ class SelfReferencingDict ( ReferenceableDict ): def __init__ ( self, *args, **kwargs ): super ( SelfReferencingDict, self ).__init__ ( *args, **kwargs ) - self [self.__class__.SELFREF_KEY] = self.ref() + self [self.__class__.SELFREF_KEY] = self.get_ref() # or use __getitem__ # --- end of __init__ (...) ---