Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #20 from StyleShare/fix-totaltime

Fix an error raised when some node data are empty.
  • Loading branch information...
commit a01c32ccc7af30a598b867691d47ba32e0e48347 2 parents 7637864 + 7574c90
@amcfague authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 linesman/middleware.py
View
5 linesman/middleware.py
@@ -413,6 +413,11 @@ def prepare_graph(source_graph, cutoff_time, break_cycles=False):
# Always use a copy for destructive changes
graph = source_graph.copy()
+ # Some node data could be empty dict
+ for node, data in graph.nodes(data=True):
+ if not data:
+ data['totaltime'] = 0
+
max_totaltime = max(data['totaltime']
for node, data in graph.nodes(data=True))
for node, data in graph.nodes(data=True):
Please sign in to comment.
Something went wrong with that request. Please try again.