Kaydet (Commit) feb6620c authored tarafından Eray Özkural's avatar Eray Özkural

* fix: id strings in graphviz can't have any punctuation chars it seems

üst 76772423
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
import sys import sys
import string
import pisi import pisi
import gettext import gettext
...@@ -143,8 +145,12 @@ class Digraph(object): ...@@ -143,8 +145,12 @@ class Digraph(object):
return list return list
def id_str(self, u): def id_str(self, u):
s = str(u) def repl(char):
return s.replace('-', '_') if char in string.punctuation:
return '_'
else:
return char
return pisi.util.concat(map(repl, str(u)))
def write_graphviz(self, f): def write_graphviz(self, f):
f.write('digraph G {\n') f.write('digraph G {\n')
......
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
# Please read the COPYING file. # Please read the COPYING file.
# #
# PISI package relation graph that represents the state of packagedb """PISI package relation graph that represents the state of packagedb"""
import string
from graph import * from graph import *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment