diff --git a/faketrack.py b/faketrack.py index 19b3f9b..423ace9 100644 --- a/faketrack.py +++ b/faketrack.py @@ -147,7 +147,9 @@ def get_report(dir: list = None) -> tuple: if rpt is not None: cnt: int = 0 for outer in rpt: - l: list = sorted(rpt[outer]) + l: list = list() + if rpt[outer] is not None: + l = sorted(rpt[outer]) if args.category == "all" or args.category == outer.lower(): print("category: %s; quantity: %d" % (outer, len(l))) for inner in l: