From 30030cc0cc808b9a1c942e89e8698ee2b522b87f Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Tue, 15 May 2018 08:04:34 +0200 Subject: Do not try to decode data read from /sys files in the show version script, it's already an str. --- src/op-mode/vyos-show-version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/op-mode/vyos-show-version.py') diff --git a/src/op-mode/vyos-show-version.py b/src/op-mode/vyos-show-version.py index 0990dd648..ce3b3b54f 100755 --- a/src/op-mode/vyos-show-version.py +++ b/src/op-mode/vyos-show-version.py @@ -41,7 +41,7 @@ def read_file(name): try: with open (name, "r") as f: data = f.read() - return data.decode().strip() + return data.strip() except: # This works since we only read /sys/class/* stuff # with this function -- cgit v1.2.3