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 6809F1381F3 for ; Fri, 30 Aug 2013 15:24:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 72F5DE0BD2; Fri, 30 Aug 2013 15:24:01 +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 074BAE0BD2 for ; Fri, 30 Aug 2013 15:24:00 +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 0DC7133DAC8 for ; Fri, 30 Aug 2013 15:24:00 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id B4764E468F for ; Fri, 30 Aug 2013 15:23:58 +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: <1377876190.372aff47b57d83ac152efdde9d447e5627a6ccff.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/db/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/db/distmap.py X-VCS-Directories: roverlay/db/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 372aff47b57d83ac152efdde9d447e5627a6ccff X-VCS-Branch: master Date: Fri, 30 Aug 2013 15:23:58 +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: 7e100118-c2c5-4b0a-99dc-16230aa59ede X-Archives-Hash: 8591e9fd780c2a7f2cf10a263cd722b9 commit: 372aff47b57d83ac152efdde9d447e5627a6ccff Author: André Erdmann mailerd de> AuthorDate: Fri Aug 30 15:23:10 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Fri Aug 30 15:23:10 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=372aff47 distmap: __delitem__(), __contains__() --- roverlay/db/distmap.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roverlay/db/distmap.py b/roverlay/db/distmap.py index 0ae294a..750969f 100644 --- a/roverlay/db/distmap.py +++ b/roverlay/db/distmap.py @@ -164,6 +164,15 @@ class _DistMapBase ( object ): self.update_only = True # --- end of __init__ (...) --- + def __contains__ ( self, key ): + return key in self._distmap + # --- end of __contains__ (...) --- + + def __delitem__ ( self, key ): + del self._distmap [key] + self._file_removed ( key ) + # --- end of __delitem__ (...) --- + def __getitem__ ( self, key ): return self._distmap [key] # --- end of __getitem__ (...) ---