Tolerate getfilesystemencoding returning None.
authorFredrik Tolf <fredrik@dolda2000.com>
Sat, 21 Sep 2013 20:47:56 +0000 (22:47 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sat, 21 Sep 2013 20:47:56 +0000 (22:47 +0200)
wrw/sp/cons.py

index ff0d0af..1e3d678 100644 (file)
@@ -40,7 +40,7 @@ class element(node):
         return self.__todom__(doc).toxml()
 
 class context(object):
-    charset = sys.getfilesystemencoding()
+    charset = (sys.getfilesystemencoding() or "ascii")
 
     def __init__(self):
         self.nodeconv = {}