Przeglądaj źródła

Reduced node-already-exists to a warning

master
Pete Shadbolt 7 lat temu
rodzic
commit
e5ad12cdb1
1 zmienionych plików z 4 dodań i 1 usunięć
  1. +4
    -1
      abp/graphstate.py

+ 4
- 1
abp/graphstate.py Wyświetl plik

@@ -71,7 +71,10 @@ class GraphState(object):
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")
self.adj[node] = {}
self.node[node] = {}


Ładowanie…
Anuluj
Zapisz