Skip to content

Commit

Permalink
add display_dicts() for user items
Browse files Browse the repository at this point in the history
  • Loading branch information
trehn committed Dec 31, 2017
1 parent dfdab46 commit c5bfb35
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bundlewrap/items/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,20 @@ def fix(self, status):
command += self.name
self.node.run(command, may_fail=True)

def display_dicts(self, cdict, sdict, keys):
for attr_name, attr_display_name in _ATTRIBUTE_NAMES.items():
try:
keys.remove(attr_name)
except ValueError:
pass
else:
keys.append(attr_display_name)
cdict[attr_display_name] = cdict[attr_name]
sdict[attr_display_name] = sdict[attr_name]
del cdict[attr_name]
del sdict[attr_name]
return (cdict, sdict, keys)

def get_auto_deps(self, items):
deps = []
groups = self.attributes['groups'] or []
Expand Down

0 comments on commit c5bfb35

Please sign in to comment.