Skip to content

Commit

Permalink
Addressed comments.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <dblock@dblock.org>
  • Loading branch information
dblock committed Sep 13, 2021
1 parent 7210cef commit 1664903
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bundle-workflow/src/manifests/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ def from_path(cls, path):

@classmethod
def compact(cls, d):
clean = {}
result = {}
for k, v in d.items():
if isinstance(v, dict):
nested = cls.compact(v)
if len(nested.keys()) > 0:
clean[k] = nested
elif v is not None and v != []:
clean[k] = v
return clean
if nested:
result[k] = nested
elif v and v != []:
result[k] = v
return result

def __to_dict(self):
return {}
Expand Down

0 comments on commit 1664903

Please sign in to comment.