summaryrefslogtreecommitdiff
path: root/alot/commands/globals.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-06-01 14:08:08 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-03-01 10:34:56 -0800
commit0dcb8ad0e829fddea92c5a76e2849e55617f7825 (patch)
treee77eb1fad21241bfde217175e3d9a33d5ce3b7ab /alot/commands/globals.py
parent06972159673c16919ddaf19ee839387af6e69a51 (diff)
repalces uses of dict.iter* with non-iter versions
in python3 dict.{keys,items,values} return views, which are similar to iterators without some of the caveats about modifying the underlying object. The iter* and view* methods have been removed, instead one warps dict.x in iter or list to get those types.
Diffstat (limited to 'alot/commands/globals.py')
-rw-r--r--alot/commands/globals.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py
index 228502e7..7e9b1bd9 100644
--- a/alot/commands/globals.py
+++ b/alot/commands/globals.py
@@ -381,7 +381,7 @@ class CallCommand(Command):
hooks = settings.hooks
if hooks:
env = {'ui': ui, 'settings': settings}
- for k, v in env.iteritems():
+ for k, v in env.items():
if k not in hooks.__dict__:
hooks.__dict__[k] = v
@@ -628,7 +628,7 @@ class HelpCommand(Command):
if modemaps:
txt = (section_att, '\n%s-mode specific maps' % ui.mode)
linewidgets.append(urwid.Text(txt))
- for (k, v) in modemaps.iteritems():
+ for (k, v) in modemaps.items():
line = urwid.Columns([('fixed', keycolumnwidth,
urwid.Text((text_att, k))),
urwid.Text((text_att, v))])
@@ -636,7 +636,7 @@ class HelpCommand(Command):
# global maps
linewidgets.append(urwid.Text((section_att, '\nglobal maps')))
- for (k, v) in globalmaps.iteritems():
+ for (k, v) in globalmaps.items():
if k not in modemaps:
line = urwid.Columns(
[('fixed', keycolumnwidth, urwid.Text((text_att, k))),
@@ -779,7 +779,7 @@ class ComposeCommand(Command):
return
# set forced headers
- for key, value in self.headers.iteritems():
+ for key, value in self.headers.items():
self.envelope.add(key, value)
# set forced headers for separate parameters