mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
kcc/graph_utils: port string.translate for py3
In py3, `str.translate` removed the second positional argument `deletechars`, which means you can not use it to delete chars from str. Use `replace` for this case. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
parent
16a228ca33
commit
767f6e599a
@ -32,7 +32,7 @@ def write_dot_file(basename, edge_list, vertices=None, label=None,
|
||||
s = dot_graph(vertices, edge_list, title=label, **kwargs)
|
||||
if label:
|
||||
# sanitise DN and guid labels
|
||||
basename += '_' + label.translate(None, ', ')
|
||||
basename += '_' + label.replace(', ', '')
|
||||
|
||||
filename = os.path.join(dot_file_dir, "%s.dot" % basename)
|
||||
if debug is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user