Explorar el Código

Reduced node-already-exists to a warning

master
Pete Shadbolt hace 7 años
padre
commit
e5ad12cdb1
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. +4
    -1
      abp/graphstate.py

+ 4
- 1
abp/graphstate.py Ver fichero

@@ -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] = {}


Cargando…
Cancelar
Guardar