python-syslogssl icon indicating copy to clipboard operation
python-syslogssl copied to clipboard

compatability with python3

Open gelidelacruz opened this issue 4 years ago • 0 comments

I encountered two issues when using this extension with python3:

1. NameError: name 'unicode' is not defined Referencing here, python3 has renamed the unicode type to str. It'll work with python3 by adding this:

import sys
if sys.version_info[0] >= 3:
    unicode = str

2. TypeError: can only concatenate str (not "bytes") to str Another error appeared after adding no.1. prio is in string format and can't be concatenated with msg that is in bytes. To fix it, we have to also convert prio to bytes.

gelidelacruz avatar May 02 '21 20:05 gelidelacruz