Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dnsviz/dnsviz.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasey Deccio <casey@deccio.net>2016-10-27 23:34:22 +0300
committerCasey Deccio <casey@deccio.net>2016-10-27 23:34:22 +0300
commit506b9227f552ae04fc98f6c7c8db49d6ac41ef9c (patch)
treedf067949565ea4349e439963454e2e3b11cc8161
parent6ecbee1ffc041957f95c313e9314c7374bd53392 (diff)
Use filesystem encoding
-rw-r--r--dnsviz/viz/dnssec.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/dnsviz/viz/dnssec.py b/dnsviz/viz/dnssec.py
index 979db67..d28b6fa 100644
--- a/dnsviz/viz/dnssec.py
+++ b/dnsviz/viz/dnssec.py
@@ -265,7 +265,7 @@ class DNSAuthGraph:
return s
def to_raphael(self):
- svg = self.G.draw(format=codecs.encode('svg', 'utf-8'), prog=codecs.encode('dot', 'utf-8'))
+ svg = self.G.draw(format=codecs.encode('svg', sys.getfilesystemencoding()), prog=codecs.encode('dot', sys.getfilesystemencoding()))
dom = xml.dom.minidom.parseString(svg)
s = 'AuthGraph.prototype.draw = function () {\n'
@@ -285,9 +285,9 @@ class DNSAuthGraph:
io.open(path, 'w', encoding='utf-8').write(img)
else:
if path is None:
- return self.G.draw(format=codecs.encode(format, 'utf-8'), prog=codecs.encode('dot', 'utf-8'))
+ return self.G.draw(format=codecs.encode(format, sys.getfilesystemencoding()), prog=codecs.encode('dot', sys.getfilesystemencoding()))
else:
- return self.G.draw(path=codecs.encode(path, 'utf-8'), format=codecs.encode(format, 'utf-8'), prog=codecs.encode('dot', 'utf-8'))
+ return self.G.draw(path=codecs.encode(path, sys.getfilesystemencoding()), format=codecs.encode(format, sys.getfilesystemencoding()), prog=codecs.encode('dot', sys.getfilesystemencoding()))
def id_for_dnskey(self, name, dnskey):
try: