From 50be6d543e7a6067b631930a025bfdaf53fedbc4 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sat, 21 Sep 2013 22:47:56 +0200 Subject: [PATCH] Tolerate getfilesystemencoding returning None. --- wrw/sp/cons.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrw/sp/cons.py b/wrw/sp/cons.py index ff0d0af..1e3d678 100644 --- a/wrw/sp/cons.py +++ b/wrw/sp/cons.py @@ -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 = {} -- 2.11.0