summaryrefslogtreecommitdiff
path: root/gr-utils/python/modtool/scm.py
diff options
context:
space:
mode:
authorSwapnil Negi <swapnil.negi09@gmail.com>2018-03-23 03:37:21 +0530
committerMarcus Müller <marcus@hostalia.de>2018-03-22 23:33:27 +0100
commit0677aba16a58d5a945ebb65fe1bf6ad6f78e6895 (patch)
tree323c18e3ffc47aaeaf35fd72286987fb456b3596 /gr-utils/python/modtool/scm.py
parentef728b6a610372b45f32ae119f8e18d1d9d3bd82 (diff)
modtool: add option for copyrightholder
fixes #1587
Diffstat (limited to 'gr-utils/python/modtool/scm.py')
-rw-r--r--gr-utils/python/modtool/scm.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/gr-utils/python/modtool/scm.py b/gr-utils/python/modtool/scm.py
index 9b0ef7db5e..aa4f94d531 100644
--- a/gr-utils/python/modtool/scm.py
+++ b/gr-utils/python/modtool/scm.py
@@ -81,6 +81,13 @@ class SCMRepository(object):
""" Returns true if this repository manager is operating on an active, source-controlled directory. """
return self.is_empty
+ def get_gituser(self):
+ """ Gets the git user """
+ try:
+ return subprocess.check_output('git config --global user.name', shell=True).strip()
+ except (OSError, subprocess.CalledProcessError):
+ return None
+
### Git #####################################################################
class GitManagerGitPython(object):