diff --git a/sau/freebsd.py b/sau/freebsd.py index 2e980bc..11530cc 100644 --- a/sau/freebsd.py +++ b/sau/freebsd.py @@ -23,13 +23,13 @@ def identify_service_from_bin(exe): ret, pkg, err = sau.helpers.exec_cmd(cmd) if not pkg: raise sau.errors.UnknownServiceError("'{}' does not belong to any package".format(exe)) - pkg = pkg.decode('utf-8').strip() + pkg = pkg.strip() log.debug('{} belongs to package {}'.format(exe, pkg)) cmd = [ PKG_PATH, 'info', '-l', pkg ] ret, out, err = sau.helpers.exec_cmd(cmd) rc_scripts = set() - for line in out.decode('utf-8').splitlines(): + for line in out.splitlines(): match = re.match(rc_script_re, line.strip()) if match: log.debug('found potential rc-script for {} at {}'.format(exe, match.group(1)))