diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-26 11:25:03 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-26 11:25:03 (GMT) |
commit | d23a83060ddad0b6da5504d8cb5d524891ad9631 (patch) | |
tree | be881c67835922bc9d1c23276047b2f0241679c1 /commands/send-patches | |
parent | bc6035454c6138d0974173900e50e33793b2e5d0 (diff) |
pep8ize
Diffstat (limited to 'commands/send-patches')
-rwxr-xr-x | commands/send-patches | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/commands/send-patches b/commands/send-patches index 52f81aa..aa2adac 100755 --- a/commands/send-patches +++ b/commands/send-patches @@ -12,6 +12,7 @@ from devbot import config GIT_CONFIG_SETUP = "sugar-build.send-patches.setup" + def get_git_config(name, is_global=False): args = ["git", "config"] @@ -25,9 +26,11 @@ def get_git_config(name, is_global=False): except subprocess.CalledProcessError: return None + def set_git_config(name, value): return subprocess.check_output(["git", "config", name, value]) + def unset_git_config(name): try: subprocess.check_output(["git", "config", "--unset", name]) @@ -35,6 +38,7 @@ def unset_git_config(name): except subprocess.CalledProcessError: return False + def get_from(): name = get_git_config("user.name", is_global=True) email = get_git_config("user.email", is_global=True) @@ -47,11 +51,13 @@ def get_from(): return "%s <%s>" % (name, email) + def get_module(): for line in open("configure.ac"): m = re.match("AC_INIT\((.+)\)", line) if m: - return m.group(1).split(",")[-1][1:-1] + return m.group(1).split(",")[-1][1:-1] + def setup(): print "Choose how to send email \n\n" \ |