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
use print() - import print_function - should be fine for both py2 and py3
[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
fe0e45b
..
7d35d9e
100644
(file)
--- a/
src/nepi/data/processing/ccn/parser.py
+++ b/
src/nepi/data/processing/ccn/parser.py
@@
-40,6
+40,8
@@
# \ nid3.log
#
# \ nid3.log
#
+from __future__ import print_function
+
import collections
import functools
import networkx
import collections
import functools
import networkx
@@
-129,7
+131,7
@@
def parse_file(filename):
try:
size = int((cols[6]).replace('(',''))
except:
try:
size = int((cols[6]).replace('(',''))
except:
- print
"interest_expiry without face id!", line
+ print
("interest_expiry without face id!", line)
continue
# If no external IP address was identified for this face
continue
# If no external IP address was identified for this face
@@
-386,7
+388,7
@@
def process_content_history_logs(logs_dir, graph, parse_ping_logs = False):
graph = annotate_cn_graph(logs_dir, graph,
parse_ping_logs = parse_ping_logs)
except:
graph = annotate_cn_graph(logs_dir, graph,
parse_ping_logs = parse_ping_logs)
except:
- print
"Skipping: Error parsing ccnd logs", logs_dir
+ print
("Skipping: Error parsing ccnd logs", logs_dir)
raise
source = ccn_consumers(graph)[0]
raise
source = ccn_consumers(graph)[0]
@@
-402,7
+404,7
@@
def process_content_history_logs(logs_dir, graph, parse_ping_logs = False):
interest_count,
content_count) = process_content_history(graph)
except:
interest_count,
content_count) = process_content_history(graph)
except:
- print
"Skipping: Error processing ccn data", logs_dir
+ print
("Skipping: Error processing ccn data", logs_dir)
raise
return (graph,
raise
return (graph,