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 1SfdFG-00022w-LK for garchives@archives.gentoo.org; Fri, 15 Jun 2012 20:35:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7044AE088D; Fri, 15 Jun 2012 20:34:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 42367E0895 for ; Fri, 15 Jun 2012 20:34:33 +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 94BEB1B404C for ; Fri, 15 Jun 2012 20:34:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 811D4E5444 for ; Fri, 15 Jun 2012 20:34:29 +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: <1339753852.f21c2a9af227ff9916cd12e1b5f976ddcd350ceb.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: f21c2a9af227ff9916cd12e1b5f976ddcd350ceb X-VCS-Branch: master Date: Fri, 15 Jun 2012 20:34:29 +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: 07795f89-cd88-40ad-beaf-446ab8dca9dc X-Archives-Hash: 9ea16235441909a65f108c9685d45155 commit: f21c2a9af227ff9916cd12e1b5f976ddcd350ceb Author: Andr=C3=A9 Erdmann mailerd de> AuthorDate: Fri Jun 15 09:50:52 2012 +0000 Commit: Andr=C3=A9 Erdmann mailerd de> CommitDate: Fri Jun 15 09:50:52 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/R_overlay.git= ;a=3Dcommit;h=3Df21c2a9a fix config --- roverlay/config.py | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/roverlay/config.py b/roverlay/config.py index abef63f..b1710f9 100644 --- a/roverlay/config.py +++ b/roverlay/config.py @@ -36,9 +36,13 @@ def get ( key, fallback_value=3DNone, fail_if_unset=3D= False ): * fallback_value -- """ if not fallback_value is None: - return access().get ( key, fallback_value, fail_if_unset ) + return access().get ( + key, fallback_value=3Dfallback_value, fail_if_unset=3Dfail_if_unset + ) else: - return access().get ( key, fail_if_unset ) + return access().get ( + key, fallback_value=3DNone, fail_if_unset=3Dfail_if_unset + ) # --- end of get (...) --- =20 def get_or_fail ( key ): @@ -180,6 +184,8 @@ class ConfigTree ( object ): if config_position is None: return None =20 for k in path: + if len (k) =3D=3D 0: + continue if k =3D=3D path [-1] and not value is None: # overwrite entry config_position [k] =3D value