From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/webapp-config:master commit in: WebappConfig/
Date: Fri, 30 Dec 2011 17:34:41 +0000 (UTC) [thread overview]
Message-ID: <9dbea9ba4215269135dce31918073d09dd9aa790.blueness@gentoo> (raw)
commit: 9dbea9ba4215269135dce31918073d09dd9aa790
Author: Arfrever <arfrever <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 30 17:34:14 2011 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri Dec 30 17:34:25 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/webapp-config.git;a=commit;h=9dbea9ba
Don't use has_key() for compatibility with Python 3.
Reported-By: Arfrever <arfrever <AT> gentoo.org>
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
---
WebappConfig/config.py | 12 ++++++------
WebappConfig/debug.py | 12 ++++++------
WebappConfig/dotconfig.py | 2 +-
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/WebappConfig/config.py b/WebappConfig/config.py
index e4f4819..65f8efa 100644
--- a/WebappConfig/config.py
+++ b/WebappConfig/config.py
@@ -797,11 +797,11 @@ class Config:
# Handle -E
envmap = []
- if (options.__dict__.has_key('envall') and
+ if ('envall' in options.__dict__ and
options.__dict__['envall']):
envmap = 'all'
- elif (options.__dict__.has_key('envvar') and
+ elif ('envvar' in options.__dict__ and
options.__dict__['envvar']):
envmap = [x.lower() for x in options.__dict__['envvar']]
@@ -818,7 +818,7 @@ class Config:
key.lower(),
value)
- if (options.__dict__.has_key('define') and
+ if ('define' in options.__dict__ and
options.__dict__['define']):
for i in options.__dict__['define']:
if '=' in i:
@@ -827,7 +827,7 @@ class Config:
i.split('=')[1])
# Indicate that --dir was found
- if options.__dict__.has_key('dir'):
+ if 'dir' in options.__dict__:
self.flag_dir = True
# Map command line options into the configuration
@@ -845,12 +845,12 @@ class Config:
'bug_report' : 'g_bugreport'}
for i in option_to_config.keys():
- if options.__dict__.has_key(i) and options.__dict__[i]:
+ if i in options.__dict__ and options.__dict__[i]:
self.config.set('USER', option_to_config[i],
str(options.__dict__[i]))
# handle verbosity
- if (options.__dict__.has_key('pretend')
+ if ('pretend' in options.__dict__
and options.__dict__['pretend']):
self.config.set('USER', 'g_verbose', 'True')
diff --git a/WebappConfig/debug.py b/WebappConfig/debug.py
index 7c14651..c3a5c47 100644
--- a/WebappConfig/debug.py
+++ b/WebappConfig/debug.py
@@ -169,26 +169,26 @@ class Message:
def cli_handle(self, options):
- if (options.__dict__.has_key('debug')
+ if ('debug' in options.__dict__
and options.__dict__['debug']):
self.debug_on()
else:
self.debug_off()
return
- if (options.__dict__.has_key('debug_class_vars')
+ if ('debug_class_vars' in options.__dict__
and options.__dict__['debug_class_vars']):
self.class_variables_on()
else:
self.class_variables_off()
- if (options.__dict__.has_key('debug_nocolor')
+ if ('debug_nocolor' in options.__dict__
and options.__dict__['debug_nocolor']):
self.color_off()
else:
self.color_on()
- if (options.__dict__.has_key('debug_level') and
+ if ('debug_level' in options.__dict__ and
options.__dict__['debug_level']):
dbglvl = int(options.__dict__['debug_level'])
if dbglvl < 0:
@@ -197,7 +197,7 @@ class Message:
dbglvl = 10
self.set_debug_level(dbglvl)
- if (options.__dict__.has_key('debug_verbose') and
+ if ('debug_verbose' in options.__dict__ and
options.__dict__['debug_verbose']):
dbgvrb = int(options.__dict__['debug_verbose'])
if dbgvrb < 1:
@@ -210,7 +210,7 @@ class Message:
('debug_classes', self.set_debug_classes),
('debug_variables', self.set_debug_variables),]:
- if (options.__dict__.has_key(i[0]) and
+ if (i[0] in options.__dict__ and
options.__dict__[i[0]]):
i[1](options.__dict__[i[0]])
diff --git a/WebappConfig/dotconfig.py b/WebappConfig/dotconfig.py
index c9a5ba1..610d1e3 100644
--- a/WebappConfig/dotconfig.py
+++ b/WebappConfig/dotconfig.py
@@ -163,7 +163,7 @@ class DotConfig:
self.read()
- if self.__data.has_key('WEB_CATEGORY'):
+ if 'WEB_CATEGORY' in self.__data:
OUT.notice(self.__data['WEB_CATEGORY'] + ' ' +
self.__data['WEB_PN'] + ' ' +
self.__data['WEB_PVR'])
next reply other threads:[~2011-12-30 17:34 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-30 17:34 Anthony G. Basile [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-06-22 23:04 [gentoo-commits] proj/webapp-config:master commit in: WebappConfig/ Devan Franchini
2017-02-16 3:09 Devan Franchini
2017-02-16 3:09 Devan Franchini
2017-02-16 3:09 Devan Franchini
2017-02-16 3:09 Devan Franchini
2016-05-12 12:42 Anthony G. Basile
2015-07-11 1:27 Devan Franchini
2015-07-03 4:50 Devan Franchini
2015-07-02 16:49 Devan Franchini
2015-06-19 22:38 Devan Franchini
2015-06-19 19:52 Devan Franchini
2015-06-19 19:52 Devan Franchini
2015-06-19 19:52 Devan Franchini
2015-06-19 19:52 Devan Franchini
2015-06-19 19:52 Devan Franchini
2015-06-19 19:52 Devan Franchini
2015-06-19 19:52 Devan Franchini
2015-06-19 19:52 Devan Franchini
2015-06-19 19:52 Devan Franchini
2015-06-19 19:52 Devan Franchini
2015-06-19 19:52 Devan Franchini
2015-06-19 19:52 Devan Franchini
2015-06-19 19:52 Devan Franchini
2015-06-19 19:52 Devan Franchini
2014-01-25 3:17 Devan Franchini
2014-01-25 3:14 Devan Franchini
2014-01-25 3:14 Devan Franchini
2014-01-25 3:14 Devan Franchini
2014-01-25 3:14 Devan Franchini
2014-01-25 3:14 Devan Franchini
2014-01-25 3:14 Devan Franchini
2014-01-25 3:14 Devan Franchini
2014-01-25 3:14 Devan Franchini
2014-01-25 3:14 Devan Franchini
2014-01-25 3:14 Devan Franchini
2014-01-25 3:14 Devan Franchini
2014-01-02 1:47 Devan Franchini
2014-01-01 1:09 Devan Franchini
2013-10-29 19:13 Devan Franchini
2013-10-29 2:40 Devan Franchini
2013-10-29 2:40 Devan Franchini
2013-10-29 2:40 Devan Franchini
2013-10-29 2:40 Devan Franchini
2013-10-29 2:40 Devan Franchini
2013-10-29 2:18 Devan Franchini
2013-10-29 2:18 Devan Franchini
2013-10-29 2:15 Devan Franchini
2013-10-10 0:35 Devan Franchini
2013-09-26 4:03 Devan Franchini
2013-09-26 3:44 Devan Franchini
2013-09-24 18:20 Anthony G. Basile
2013-09-24 18:20 Anthony G. Basile
2013-09-24 18:20 Anthony G. Basile
2013-09-24 18:20 Anthony G. Basile
2013-08-06 12:28 Anthony G. Basile
2013-08-06 11:00 Anthony G. Basile
2013-08-06 11:00 Anthony G. Basile
2013-08-03 13:24 Anthony G. Basile
2013-08-03 13:24 Anthony G. Basile
2013-08-03 13:24 Anthony G. Basile
2013-04-22 0:52 Anthony G. Basile
2013-03-23 4:05 Anthony G. Basile
2013-03-14 2:19 Anthony G. Basile
2013-03-09 13:45 Anthony G. Basile
2013-02-12 3:40 Anthony G. Basile
2012-06-29 13:00 Anthony G. Basile
2012-06-29 13:00 Anthony G. Basile
2012-06-29 13:00 Anthony G. Basile
2012-06-29 13:00 Anthony G. Basile
2012-06-29 13:00 Anthony G. Basile
2012-06-29 13:00 Anthony G. Basile
2012-06-29 13:00 Anthony G. Basile
2011-12-30 17:52 Anthony G. Basile
2011-12-30 17:50 Anthony G. Basile
2011-12-30 17:23 Anthony G. Basile
2011-12-30 17:11 Anthony G. Basile
2011-12-30 16:50 Anthony G. Basile
2011-12-30 16:42 Anthony G. Basile
2011-08-06 1:51 Anthony G. Basile
2011-06-14 15:23 Anthony G. Basile
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9dbea9ba4215269135dce31918073d09dd9aa790.blueness@gentoo \
--to=blueness@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox