[U-Boot] [PATCH] wip
Simon Glass
sjg at chromium.org
Thu Jun 14 21:23:12 UTC 2018
Signed-off-by: Simon Glass <sjg at chromium.org>
---
tools/patman/gitutil.py | 3 +++
tools/patman/settings.py | 7 +++++++
2 files changed, 10 insertions(+)
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index 64ac0c8d3d..c383af1cb3 100644
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -405,6 +405,9 @@ def EmailPatches(series, cover_fname, args, dry_run, raise_on_error, cc_fname,
to = BuildEmailList([os.getenv('USER')], '--to', alias, raise_on_error)
cc = []
cmd = ['git', 'send-email', '--annotate']
+ smtp = settings.GetEmailSetting('smtp_server'):
+ if smtp:
+ cmd.append('--smtp-server=%s' % smtp)
if in_reply_to:
if type(in_reply_to) != str:
in_reply_to = in_reply_to.encode('utf-8')
diff --git a/tools/patman/settings.py b/tools/patman/settings.py
index 94ea5b5a1b..0af016d517 100644
--- a/tools/patman/settings.py
+++ b/tools/patman/settings.py
@@ -303,6 +303,9 @@ def GetItems(config, section):
except:
raise
+def GetEmailSetting(name):
+ return email.get(name)
+
def Setup(parser, project_name, config_fname=''):
"""Set up the settings module by reading config files.
@@ -331,11 +334,15 @@ def Setup(parser, project_name, config_fname=''):
for name, value in GetItems(config, 'bounces'):
bounces.add(value)
+ for name, value in GetItems(config, 'email'):
+ email[name] = value
+
_UpdateDefaults(parser, config)
# These are the aliases we understand, indexed by alias. Each member is a list.
alias = {}
bounces = set()
+email = {}
if __name__ == "__main__":
import doctest
--
2.18.0.rc1.244.gcf134e6275-goog
More information about the U-Boot
mailing list