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 787FC1392EF for ; Fri, 27 Jun 2014 04:08:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C7B15E0B14; Fri, 27 Jun 2014 04:07:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 38008E0B11 for ; Fri, 27 Jun 2014 04:07:51 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 228AA34015D for ; Fri, 27 Jun 2014 04:07:50 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id C098D19184 for ; Fri, 27 Jun 2014 04:07:48 +0000 (UTC) From: "Devan Franchini" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Devan Franchini" Message-ID: <1402967241.fc428382a7b37ea19d91fef046482e6d574df9dd.twitch153@gentoo> Subject: [gentoo-commits] proj/layman:gsoc2014 commit in: layman/ X-VCS-Repository: proj/layman X-VCS-Files: layman/config.py X-VCS-Directories: layman/ X-VCS-Committer: twitch153 X-VCS-Committer-Name: Devan Franchini X-VCS-Revision: fc428382a7b37ea19d91fef046482e6d574df9dd X-VCS-Branch: gsoc2014 Date: Fri, 27 Jun 2014 04:07:48 +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: 6361708c-9e1d-4d09-bfe4-6398832dd65b X-Archives-Hash: c3b747ba59195616802db798ecb717fe commit: fc428382a7b37ea19d91fef046482e6d574df9dd Author: Devan Franchini gentoo org> AuthorDate: Tue Jun 17 01:07:21 2014 +0000 Commit: Devan Franchini gentoo org> CommitDate: Tue Jun 17 01:07:21 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=fc428382 config.py: Improves quietness logic for OptionConfig This improvement prevents KeyError exceptions. --- layman/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layman/config.py b/layman/config.py index 761dd57..ead56cf 100644 --- a/layman/config.py +++ b/layman/config.py @@ -302,7 +302,7 @@ class BareConfig(object): class OptionConfig(BareConfig): - """This subclasses BareCongig adding functions to make overriding + """This subclasses BareConfig adding functions to make overriding or resetting defaults and/or setting options much easier by using dictionaries. """ @@ -340,7 +340,7 @@ class OptionConfig(BareConfig): if 'quiet' in keys: self.set_option('quiet', options['quiet']) options.pop('quiet') - if 'quietness' in keys and not options['quiet']: + elif 'quietness' in keys: self._set_quietness(options['quietness']) options.pop('quietness') self._options.update(options)