From 4d9e8e3f30f21c95f04d0c51f1083dc802bf8daf Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 7 Apr 2021 18:15:47 +0100 Subject: [PATCH] dashboard: Convert open(pathlib) to pathlib.open() --- dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard.py b/dashboard.py index bdd6e151..649fb6f3 100644 --- a/dashboard.py +++ b/dashboard.py @@ -177,7 +177,7 @@ class Dashboard(FileSystemEventHandler): return try: - with open(pathlib.Path(self.currentdir) / 'Status.json', 'rb') as h: + with (pathlib.Path(self.currentdir) / 'Status.json').open('rb') as h: data = h.read().strip() if data: # Can be empty if polling while the file is being re-written