aboutsummaryrefslogtreecommitdiff
path: root/standardskriver
diff options
context:
space:
mode:
Diffstat (limited to 'standardskriver')
-rwxr-xr-xstandardskriver8
1 files changed, 4 insertions, 4 deletions
diff --git a/standardskriver b/standardskriver
index bf61898..26d5e0d 100755
--- a/standardskriver
+++ b/standardskriver
@@ -95,7 +95,7 @@ cfg.OPTCRE = re.compile(
# by any # space/tab
r'(?P<value>.*)$' # everything up to eol
)
-cfg.readfp(open(CFG_FILE, 'rb'))
+cfg.readfp(open(CFG_FILE, 'r'))
if cfg.get('settings', 'enable') != "yes":
sys.exit(0)
@@ -117,15 +117,15 @@ except KeyError:
pass
p = subprocess.Popen(['/sbin/ifconfig'], env={'LANG': 'C'}, stdout=subprocess.PIPE)
for line in p.stdout:
- m = re_ipaddr.search(line)
+ m = re_ipaddr.search(line.decode())
if m:
ipaddrs.append(m.group(1))
p.wait()
p = subprocess.Popen(['id', '-Gn'], stdout=subprocess.PIPE)
-groups = p.stdout.read().split()
+groups = [ g.decode() for g in p.stdout.read().split() ]
p.wait()
-#print groups
+#print (groups)
def get_group_match():
group_sections = ['groups']