From 00e01cd3a7088bc7822fc9f129a1196d4e4e8ecd Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Wed, 14 Dec 2011 22:20:43 -0500 Subject: [PATCH] Default to the empty string if passed None. --- xonstat/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xonstat/util.py b/xonstat/util.py index 2b9e8b0..98c4bea 100755 --- a/xonstat/util.py +++ b/xonstat/util.py @@ -61,6 +61,8 @@ _hex_colors = re.compile(r'\^x([\dA-Fa-f])([\dA-Fa-f])([\dA-Fa-f])') def qfont_decode(qstr=''): """ Convert the qfont characters in a string to ascii. """ + if qstr == None: + qstr = '' chars = [] for c in qstr: if c >= u'\ue000' and c <= u'\ue0ff': -- 2.39.2