mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Unpacking dict with the six iterator
This commit is contained in:
parent
5e82685b89
commit
0e535f2c8c
1 changed files with 2 additions and 2 deletions
|
@ -86,6 +86,7 @@ import cgi
|
|||
from email.mime.text import MIMEText
|
||||
|
||||
import yaml
|
||||
from salt.ext import six
|
||||
from salt.ext.six.moves import range
|
||||
from salt.ext.six.moves import StringIO
|
||||
|
||||
|
@ -185,8 +186,7 @@ def _generate_html_table(data, out, level=0, extra_style=''):
|
|||
else:
|
||||
new_extra_style = extra_style
|
||||
if len(subdata) == 1:
|
||||
name = list(subdata.keys())[0]
|
||||
value = list(subdata.values())[0]
|
||||
name, value = next(six.iteritems(subdata))
|
||||
print('<tr style="{0}">'.format(
|
||||
_lookup_style('tr', [row_style])
|
||||
), file=out)
|
||||
|
|
Loading…
Add table
Reference in a new issue