Skip to content

Commit

Permalink
Merge pull request #215 from JVickery-TBS/fix/log-local-py3
Browse files Browse the repository at this point in the history
LocalCKAN Logging for PY3
  • Loading branch information
wardi authored Mar 13, 2024
2 parents 080e8c7 + c67636e commit ddbb0ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckanapi/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ def main(running_with_paster=False):
# cannot find user
out = '<unknown user>'
else:
# remove line breaks from whoami's
out = out.replace('\n', '').replace('\r', '')
# decode and remove line breaks from whoami's
out = out.decode().replace('\n', '').replace('\r', '')
# split the `who am i`
out = out.split()[0]
log.info('OS User %s executed LocalCKAN: ckanapi %s',
out, u' '.join(sys.argv[1:]))
out, ' '.join(sys.argv[1:]))

stdout = getattr(sys.stdout, 'buffer', sys.stdout)
if arguments['action']:
Expand Down

0 comments on commit ddbb0ba

Please sign in to comment.