git://git.onelab.eu
/
nepi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug fixing the netgraph persistence
[nepi.git]
/
src
/
nepi
/
data
/
processing
/
ccn
/
parser.py
diff --git
a/src/nepi/data/processing/ccn/parser.py
b/src/nepi/data/processing/ccn/parser.py
index
9b83a4c
..
f6452f4
100644
(file)
--- a/
src/nepi/data/processing/ccn/parser.py
+++ b/
src/nepi/data/processing/ccn/parser.py
@@
-199,6
+199,7
@@
def annotate_cn_graph(logs_dir, graph, parse_ping_logs = False):
""" Adds CCN content history for each node in the topology graph.
"""
""" Adds CCN content history for each node in the topology graph.
"""
+
# Make a copy of the graph to ensure integrity
graph = graph.copy()
# Make a copy of the graph to ensure integrity
graph = graph.copy()
@@
-219,6
+220,10
@@
def annotate_cn_graph(logs_dir, graph, parse_ping_logs = False):
# Each dirpath correspond to a different node
nid = os.path.basename(dirpath)
# Each dirpath correspond to a different node
nid = os.path.basename(dirpath)
+
+ # Cast to numeric nid if necessary
+ if int(nid) in graph.nodes():
+ nid = int(nid)
content_history = dict()
content_history = dict()