* fix: id strings in graphviz can't have any punctuation chars it seems
This commit is contained in:
+8
-2
@@ -13,6 +13,8 @@
|
||||
|
||||
|
||||
import sys
|
||||
import string
|
||||
|
||||
import pisi
|
||||
|
||||
import gettext
|
||||
@@ -143,8 +145,12 @@ class Digraph(object):
|
||||
return list
|
||||
|
||||
def id_str(self, u):
|
||||
s = str(u)
|
||||
return s.replace('-', '_')
|
||||
def repl(char):
|
||||
if char in string.punctuation:
|
||||
return '_'
|
||||
else:
|
||||
return char
|
||||
return pisi.util.concat(map(repl, str(u)))
|
||||
|
||||
def write_graphviz(self, f):
|
||||
f.write('digraph G {\n')
|
||||
|
||||
+3
-1
@@ -10,7 +10,9 @@
|
||||
# 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 *
|
||||
|
||||
|
||||
Reference in New Issue
Block a user