summaryrefslogtreecommitdiff
path: root/tools/patman
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-06-07 06:45:47 -0600
committerSimon Glass <sjg@chromium.org>2020-07-09 18:57:22 -0600
commit38a9d3b31aec796a23f98ace17ebe6f7baf326fc (patch)
treed96672c799f8c059541f2deb84841461012ebb68 /tools/patman
parentddd65b01561d6941f78363751d9713bc4cbb0cd1 (diff)
patman: Use a dict in gitutil to avoid importing series
Only a few members of this class are used and only in a test. To avoid importing the module, convert the test to use a dict. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Stefan Bosch <stefan_b@posteo.net>
Diffstat (limited to 'tools/patman')
-rw-r--r--tools/patman/gitutil.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index c9ceb28a05..5189840eab 100644
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -8,7 +8,6 @@ import subprocess
import sys
from patman import command
-from patman import series
from patman import settings
from patman import terminal
from patman import tools
@@ -368,9 +367,9 @@ def EmailPatches(series, cover_fname, args, dry_run, raise_on_error, cc_fname,
>>> alias['boys'] = ['fred', ' john']
>>> alias['all'] = ['fred ', 'john', ' mary ']
>>> alias[os.getenv('USER')] = ['this-is-me@me.com']
- >>> series = series.Series()
- >>> series.to = ['fred']
- >>> series.cc = ['mary']
+ >>> series = {}
+ >>> series['to'] = ['fred']
+ >>> series['cc'] = ['mary']
>>> EmailPatches(series, 'cover', ['p1', 'p2'], True, True, 'cc-fname', \
False, alias)
'git send-email --annotate --to "f.bloggs@napier.co.nz" --cc \
@@ -379,7 +378,7 @@ def EmailPatches(series, cover_fname, args, dry_run, raise_on_error, cc_fname,
alias)
'git send-email --annotate --to "f.bloggs@napier.co.nz" --cc \
"m.poppins@cloud.net" --cc-cmd "./patman --cc-cmd cc-fname" p1'
- >>> series.cc = ['all']
+ >>> series['cc'] = ['all']
>>> EmailPatches(series, 'cover', ['p1', 'p2'], True, True, 'cc-fname', \
True, alias)
'git send-email --annotate --to "this-is-me@me.com" --cc-cmd "./patman \