web: __init__: _rep: Make the looping more pythonic
As suggested, changes around the for loop to make it a bit more
pythonic by using an if loop inside a normal for loop.
@@ -44,7 +44,8 @@ def _rep(obj, expand=False):
del out['path']
# Filter all bytes attributes and convert them to strings
- for key in filter(lambda key: isinstance(out[key], bytes), out):
+ for key, value in out.items():
+ if isinstance(out[key], bytes):
out[key] = base64.b64encode(out[key]).decode('ascii')
# Get the size (in bytes) of the backing file. This is useful
