diff options
Diffstat (limited to 'test/dbus/testutils.py')
-rw-r--r-- | test/dbus/testutils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/dbus/testutils.py b/test/dbus/testutils.py index ad2fe25c..cffcc683 100644 --- a/test/dbus/testutils.py +++ b/test/dbus/testutils.py @@ -77,7 +77,8 @@ def dict2event(d): return ev def parse_events(path): - data = json.load(open(path)) + with open(path) as f: + data = json.load(f) events = list(map(dict2event, data)) return events |