diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2022-06-07 16:44:58 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2022-06-07 16:44:58 +0200 |
commit | 9451f1ae096be4113fecca67ca24980a97f83340 (patch) | |
tree | 97eed2b1a20c7fb559648fcceb444ec5a4960f5c | |
parent | 72b40d5aa0833b0c097a1eccbc8a3f47aca32f09 (diff) | |
parent | ba97815a7a44e6815c9d4baefe77604569fecbcb (diff) | |
download | spline-startup-9451f1ae096be4113fecca67ca24980a97f83340.tar.gz spline-startup-9451f1ae096be4113fecca67ca24980a97f83340.tar.bz2 spline-startup-9451f1ae096be4113fecca67ca24980a97f83340.zip |
Merge tag '1.6' into debian
* tag '1.6':
Python3 support
-rwxr-xr-x | spline-startup | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spline-startup b/spline-startup index fc1404f..d0437af 100755 --- a/spline-startup +++ b/spline-startup @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import argparse @@ -62,7 +62,7 @@ class Executor(Popen): pass if ready[0] != []: - buffer += self.stdout.read(8192) + buffer += self.stdout.read(8192).decode('utf-8') lines = buffer.splitlines() for line in lines[:-1]: yield line @@ -72,7 +72,7 @@ class Executor(Popen): self.wait() try: - buffer += self.stdout.read(8192) + buffer += self.stdout.read(8192).decode('utf-8') except: pass @@ -168,7 +168,7 @@ class SplineStartup(object): self._pinfo('Getting scripts: %s' % ' '.join(cmd)) proc = Popen(cmd, stdout=PIPE, stderr=STDOUT) output, _ = proc.communicate() - return output.strip().splitlines() + return output.strip().decode('utf-8').splitlines() def _run_scripts(self, user, actions, use_su=True): self._pdebug("Running scripts for user '%s'" % user.pw_name) |