summaryrefslogtreecommitdiff
path: root/poezio
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2015-10-25 13:17:35 +0000
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-06-11 20:49:46 +0100
commit739793e9bc562115a1d5b5be6f91c439398077e7 (patch)
tree5a13a281fcdaf834642edb9a5908e4c79b57f0ee /poezio
parent58d66ad03bdaf21f806b1e33b0d7d1a7ccffbb15 (diff)
downloadpoezio-739793e9bc562115a1d5b5be6f91c439398077e7.tar.gz
poezio-739793e9bc562115a1d5b5be6f91c439398077e7.tar.bz2
poezio-739793e9bc562115a1d5b5be6f91c439398077e7.tar.xz
poezio-739793e9bc562115a1d5b5be6f91c439398077e7.zip
Prefer '\0' to None or an empty string for single characters.
Diffstat (limited to 'poezio')
-rwxr-xr-xpoezio/theming.py2
-rw-r--r--poezio/windows/funcs.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/poezio/theming.py b/poezio/theming.py
index 5d263741..b420c233 100755
--- a/poezio/theming.py
+++ b/poezio/theming.py
@@ -400,7 +400,7 @@ def read_tuple(_str):
Read a tuple dumped with dump_tumple
"""
attrs = _str.split(',')
- char = attrs[2] if len(attrs) > 2 else None
+ char = attrs[2] if len(attrs) > 2 else '\0'
return (int(attrs[0]), int(attrs[1])), char
def to_curses_attr(color_tuple):
diff --git a/poezio/windows/funcs.py b/poezio/windows/funcs.py
index f1401628..cc48ffab 100644
--- a/poezio/windows/funcs.py
+++ b/poezio/windows/funcs.py
@@ -35,7 +35,7 @@ def parse_attrs(text, previous=None):
if next_attr_char + 1 < len(text):
attr_char = text[next_attr_char+1].lower()
else:
- attr_char = str()
+ attr_char = '\0'
if attr_char == 'o':
attrs = []
elif attr_char == 'u':