From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/base/, catalyst/
Date: Thu, 8 Oct 2015 20:02:33 +0000 (UTC) [thread overview]
Message-ID: <1444332847.080eab6b951ada8e6b982a71a4ff701241d7caee.dolsen@gentoo> (raw)
commit: 080eab6b951ada8e6b982a71a4ff701241d7caee
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 8 19:33:17 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Oct 8 19:34:07 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=080eab6b
Fix argparse conversion breakage for verbose and debug settings
Argparse always defines the target variable.
Convert the use of them to normal assignment rather than a member inclusion test.
catalyst/base/genbase.py | 6 +++---
catalyst/lock.py | 12 ++++++------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index a163638..32459b4 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -26,7 +26,7 @@ class GenBase(object):
array.sort()
for j in array:
contents = contents_map.contents(path, j,
- verbose="VERBOSE" in self.settings)
+ verbose=self.settings["VERBOSE"])
if contents:
myf.write(contents)
myf.close()
@@ -49,12 +49,12 @@ class GenBase(object):
if "all" in array:
for k in list(hash_map.hash_map):
digest = hash_map.generate_hash(f,hash_=k,
- verbose = "VERBOSE" in self.settings)
+ verbose=self.settings["VERBOSE"])
myf.write(digest)
else:
for j in array:
digest = hash_map.generate_hash(f,hash_=j,
- verbose = "VERBOSE" in self.settings)
+ verbose=self.settings["VERBOSE"])
myf.write(digest)
myf.close()
diff --git a/catalyst/lock.py b/catalyst/lock.py
index 3d50c06..8095a82 100644
--- a/catalyst/lock.py
+++ b/catalyst/lock.py
@@ -71,7 +71,7 @@ class LockDir(object):
def set_gid(self,gid):
if not self.islocked():
-# if "DEBUG" in self.settings:
+# if self.settings["DEBUG"]:
# print "setting gid to", gid
self.gid=gid
@@ -83,7 +83,7 @@ class LockDir(object):
if lockdir[-1] == "/":
lockdir=lockdir[:-1]
self.lockdir=normpath(lockdir)
-# if "DEBUG" in self.settings:
+# if self.settings["DEBUG"]:
# print "setting lockdir to", self.lockdir
else:
raise "the lock object needs a path to a dir"
@@ -91,13 +91,13 @@ class LockDir(object):
def set_lockfilename(self,lockfilename):
if not self.islocked():
self.lockfilename=lockfilename
-# if "DEBUG" in self.settings:
+# if self.settings["DEBUG"]:
# print "setting lockfilename to", self.lockfilename
def set_lockfile(self):
if not self.islocked():
self.lockfile=normpath(self.lockdir+'/'+self.lockfilename)
-# if "DEBUG" in self.settings:
+# if self.settings["DEBUG"]:
# print "setting lockfile to", self.lockfile
def read_lock(self):
@@ -222,7 +222,7 @@ class LockDir(object):
os.unlink(self.lockfile)
os.close(self.myfd)
self.myfd=None
-# if "DEBUG" in self.settings:
+# if self.settings["DEBUG"]:
# print "Unlinked lockfile..."
except Exception, e:
# We really don't care... Someone else has the lock.
@@ -269,7 +269,7 @@ class LockDir(object):
try:
os.link(self.myhardlock, self.lockfile)
except Exception:
-# if "DEBUG" in self.settings:
+# if self.settings["DEBUG"]:
# print "lockfile(): Hardlink: Link failed."
# print "Exception: ",e
pass
next reply other threads:[~2015-10-08 20:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-08 20:02 Brian Dolbec [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-01 19:27 [gentoo-commits] proj/catalyst:master commit in: catalyst/base/, catalyst/ Andreas K. Hüttel
2021-02-28 14:39 Andreas K. Hüttel
2021-02-20 21:27 Matt Turner
2020-10-30 22:41 Matt Turner
2020-04-17 19:52 Matt Turner
2020-04-13 20:36 Matt Turner
2020-01-27 18:52 Rick Farina
2016-05-22 3:34 Mike Frysinger
2016-03-23 16:38 Brian Dolbec
2016-03-21 5:15 Mike Frysinger
2015-09-08 14:14 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-09-08 14:17 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-01-01 5:59 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 20:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-01-01 5:59 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 4:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
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=1444332847.080eab6b951ada8e6b982a71a4ff701241d7caee.dolsen@gentoo \
--to=dolsen@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