summarylogtreecommitdiffstats
path: root/reboot-guard-python3.patch
blob: bd3b3606a2b15616cf9c975c4d5dc7a00971e00b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- a/rguard
+++ b/rguard
@@ -1,4 +1,4 @@
-#!/usr/bin/python2
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 # Copyright 2015, 2017 Ryan Sawhill Aroha <rsaw@redhat.com>
 #
@@ -107,7 +107,7 @@ class RebootGuard:
         """Return True if systemd *unit* is configured with RefuseManualStart=yes"""  
         cmd = ['systemctl', 'show', unit, '-p', 'RefuseManualStart']
         try:
-            out = subprocess.check_output(cmd)
+            out = subprocess.check_output(cmd, encoding='utf-8')
         except:
             logging.error("Unexpected error running: {}".format(' '.join(cmd)))
             return