aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/git
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-11-06 19:22:03 +0100
committerGuido Günther <agx@sigxcpu.org>2017-11-06 19:27:52 +0100
commit031910888f8d1d407a7c4b8e838cf596c336327b (patch)
tree24db8db0f3423bee71fd7a2203d3bbbe4c0bddba /gbp/git
parent2343b5cb84dffb596955ea5d113d59be6054f508 (diff)
GitModifier: add get()
Diffstat (limited to 'gbp/git')
-rw-r--r--gbp/git/modifier.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gbp/git/modifier.py b/gbp/git/modifier.py
index ca4b3167..28d8bde2 100644
--- a/gbp/git/modifier.py
+++ b/gbp/git/modifier.py
@@ -149,6 +149,12 @@ class GitModifier(object):
"""
return self._get_env('committer')
+ def get(self, key, default=None):
+ if key in self.keys():
+ return self.__getitem__(key)
+ else:
+ return default
+
def __getitem__(self, key):
if key == 'date':
return self.date