From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SfdF4-000215-NI for garchives@archives.gentoo.org; Fri, 15 Jun 2012 20:35:39 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5F3ADE0788; Fri, 15 Jun 2012 20:34:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 1EDC4E077A for ; Fri, 15 Jun 2012 20:34:29 +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 3F3ED1B403D for ; Fri, 15 Jun 2012 20:34:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 08506E5430 for ; Fri, 15 Jun 2012 20:34:28 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1339699835.c335d96105c50c6f988ffac378a9d17ada050874.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/config.py X-VCS-Directories: roverlay/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: c335d96105c50c6f988ffac378a9d17ada050874 X-VCS-Branch: master Date: Fri, 15 Jun 2012 20:34:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: ada1eac9-4118-48a9-b32b-370e007db2b7 X-Archives-Hash: 3707691b6b54a9b2cf3ee4acf49864d2 commit: c335d96105c50c6f988ffac378a9d17ada050874 Author: Andr=C3=A9 Erdmann mailerd de> AuthorDate: Thu Jun 14 18:50:35 2012 +0000 Commit: Andr=C3=A9 Erdmann mailerd de> CommitDate: Thu Jun 14 18:50:35 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/R_overlay.git= ;a=3Dcommit;h=3Dc335d961 config * fix get()/_findpath() * add key/value injection modified: roverlay/config.py --- roverlay/config.py | 74 ++++++++++++++++++++++++++++++++++++++++------= ------ 1 files changed, 57 insertions(+), 17 deletions(-) diff --git a/roverlay/config.py b/roverlay/config.py index 3f6707b..abef63f 100644 --- a/roverlay/config.py +++ b/roverlay/config.py @@ -18,7 +18,7 @@ from roverlay import const from roverlay.rpackage import descriptionfields =20 =20 - +CONFIG_INJECTION_IS_BAD =3D True =20 def access(): """Returns the ConfigTree.""" @@ -26,7 +26,7 @@ def access(): # --- end of access (...) --- =20 =20 -def get ( key, fallback_value=3DNone ): +def get ( key, fallback_value=3DNone, fail_if_unset=3DFalse ): """Searches for key in the ConfigTree and returns its value if possible= , else fallback_value. 'key' is a config path [
[.*]]