Browse Source

Reduced node-already-exists to a warning

master
Pete Shadbolt 8 years ago
parent
commit
e5ad12cdb1
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      abp/graphstate.py

+ 4
- 1
abp/graphstate.py View File

@@ -71,7 +71,10 @@ class GraphState(object):
fred fred


""" """
assert not node in self.node, "Node {} already exists".format(v)
if node in self.node:
print "Warning: node {} already exists".format(node)
return

default = kwargs.get("default", "identity") default = kwargs.get("default", "identity")
self.adj[node] = {} self.adj[node] = {}
self.node[node] = {} self.node[node] = {}


Loading…
Cancel
Save