Address 'TEMP cannot use a string pattern on a bytes-like object' and make logging use syslog #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this patch, reverse_srs would work but I would consistently get an error when calling make_srs:
% ./smapc unix:///tmp/pysrs make_srs 'infooo<@example.org.>'
TEMP cannot use a string pattern on a bytes-like object
% ./smapc unix:///tmp/pysrs reverse_srs 'SRS0=J6Lly=CZ=example.org=infooo<@example.com.>'
OK infooo<@example.org.>
After the patch both directions seem to work just fine:
% ./smapc unix:///tmp/pysrs make_srs 'infooo<@example.org.>'
OK SRS0=J6Lly=CZ=example.org=infooo<@example.com.>
% ./smapc unix:///tmp/pysrs reverse_srs 'SRS0=J6Lly=CZ=example.org=infooo<@example.com.>'
OK infooo<@example.org.>
To help debugging I also made the logging go to syslog rather than STDOUT.