From 25c3f52e9caf261500d78f795efc47a20fc91afe Mon Sep 17 00:00:00 2001 From: Oleksandr Shulgin Date: Mon, 5 Sep 2016 11:21:55 +0200 Subject: [PATCH] Fix AttributeError due to IOError on /proc/X/statm Closes #66 --- pg_view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pg_view.py b/pg_view.py index ec77312..e873e00 100644 --- a/pg_view.py +++ b/pg_view.py @@ -1290,7 +1290,7 @@ def _get_memory_usage(self, pid): logger.info("calculating memory for process {0}".format(pid)) except IOError as e: logger.warning('Unable to read {0}: {1}, process memory information will be unavailable'.format( - self.format(pid), e)) + self.STATM_FILENAME.format(pid), e)) finally: fp and fp.close() if statm and len(statm) >= 3: