瀏覽代碼

Reduced node-already-exists to a warning

master
Pete Shadbolt 8 年之前
父節點
當前提交
e5ad12cdb1
共有 1 個檔案被更改,包括 4 行新增1 行删除
  1. +4
    -1
      abp/graphstate.py

+ 4
- 1
abp/graphstate.py 查看文件

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


Loading…
取消
儲存