git.samba.org
/
amitay
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
470499f
)
graph: fix divide for py3
author
Joe Guo
<joeg@catalyst.net.nz>
Tue, 10 Apr 2018 03:48:35 +0000
(15:48 +1200)
committer
Douglas Bagnall
<dbagnall@samba.org>
Fri, 13 Apr 2018 05:27:13 +0000
(07:27 +0200)
`/` will return float other than int in py3.
Use `//` to keep consistent with py2.
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>
python/samba/graph.py
patch
|
blob
|
history
diff --git
a/python/samba/graph.py
b/python/samba/graph.py
index 3b8f61194f4ca0d6cc7e68416b268c57b87f1833..6cdd2ef77ed67c020234345b116f5ac6f0fc8cd8 100644
(file)
--- a/
python/samba/graph.py
+++ b/
python/samba/graph.py
@@
-497,7
+497,7
@@
def get_transitive_colourer(colours, n_vertices):
n = 1 + int(n_vertices ** 0.5)
def f(link):
- return scale[min(link * m / n, m - 1)]
+ return scale[min(link * m /
/
n, m - 1)]
else:
def f(link):