Make networkx version check Python3 friendly

This commit is contained in:
Gökçen Eraslan 2018-03-15 20:37:32 +01:00 committed by GitHub
parent 0afab746b2
commit 9f23babfe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ import os
import networkx as nx import networkx as nx
from networkx.readwrite import json_graph from networkx.readwrite import json_graph
version_info = map(int, nx.__version__.split('.')) version_info = list(map(int, nx.__version__.split('.')))
major = version_info[0] major = version_info[0]
minor = version_info[1] minor = version_info[1]
assert (major <= 1) and (minor <= 11), "networkx major version > 1.11" assert (major <= 1) and (minor <= 11), "networkx major version > 1.11"