]> git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Default to the empty string if passed None.
authorAnt Zucaro <azucaro@gmail.com>
Thu, 15 Dec 2011 03:20:43 +0000 (22:20 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Thu, 15 Dec 2011 03:20:43 +0000 (22:20 -0500)
xonstat/util.py

index 2b9e8b0d6884e4f6a045ea4209330fd2c11af076..98c4bea91ef2234c39d9810e94b6b2e368014ae3 100755 (executable)
@@ -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':