projects
/
mw2txt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9ab68a
)
script-publish.py: Don't print raw strings to the log
author
W. Trevor King
<wking@tremily.us>
Sun, 13 Jan 2013 15:23:08 +0000
(10:23 -0500)
committer
W. Trevor King
<wking@tremily.us>
Sun, 13 Jan 2013 15:23:08 +0000
(10:23 -0500)
Print their repr() instead, since the strings may contain funky
characters and missed control codes.
posts/script/script-publish.py
patch
|
blob
|
history
diff --git
a/posts/script/script-publish.py
b/posts/script/script-publish.py
index ea47b2cff2f98ae949564017fe7af933c456d592..4f750e481091a68eee7139cce5a84a87fc52922c 100755
(executable)
--- a/
posts/script/script-publish.py
+++ b/
posts/script/script-publish.py
@@
-597,7
+597,10
@@
class ControlParser (object):
chunks = self._replace_control_codes(text)
chunks = self._decode_text(chunks)
for chunk in chunks:
- _LOG.debug(chunk)
+ if isinstance(chunk, str):
+ _LOG.debug(repr(chunk))
+ else:
+ _LOG.debug(chunk)
chunks = self._replace_tabs(chunks)
chunks = self._merge_adjacent_text(chunks)
chunks = self._remove_operating_system_commands(chunks)