From 91983334f93ba40ee7412529080078fc0055a5da Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 8 Mar 2017 22:33:16 +0100 Subject: Fix lid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/plugins/lid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/lid.py b/src/plugins/lid.py index c307abb..ed25bf8 100644 --- a/src/plugins/lid.py +++ b/src/plugins/lid.py @@ -37,5 +37,5 @@ class Lid: ''' if not os.path.exists('/proc/acpi/button/lid/LID/state'): return None - with open('/proc/acpi/button/lid/LID/state') as file: - return 'open' in file.read.decode('utf-8', 'strict') + with open('/proc/acpi/button/lid/LID/state', 'rb') as file: + return 'open' in file.read().decode('utf-8', 'strict') -- cgit v1.2.3-70-g09d2