From 6d1cd9015810a50f37c617cbace9f130931bfc1f Mon Sep 17 00:00:00 2001 From: idziubenko Date: Thu, 13 Jan 2022 17:12:20 +0300 Subject: [PATCH] fix: fixed crash if a binary file is present in etc/portage --- pym/calculate/lib/utils/portage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/calculate/lib/utils/portage.py b/pym/calculate/lib/utils/portage.py index 2c123f0..2740d90 100644 --- a/pym/calculate/lib/utils/portage.py +++ b/pym/calculate/lib/utils/portage.py @@ -1812,7 +1812,10 @@ class PortageState(): for dirdata in self.getpathdata(dfn): yield dirdata else: - yield readFile(fn) + try: + yield readFile(fn) + except UnicodeDecodeError as e: + pass def get_state(self): m = hashlib.md5()