fix: change check release_file
@@ -52,8 +52,9 @@ class MemoryLeakDiagnostic(Plugin):
release_file = open(os_release_file, 'r').readlines()
except Exception as e:
logging.error(f'Cannot read file {os_release_file} : {e}')
+ release_file = None
self.disable()
-
+ if release_file:
for line in release_file:
if line.strip('"\n') != '':
k, v = line.split('=', 1)
