소스 검색

Fix specific situation with link to self

Yentl Van Tendeloo 8 년 전
부모
커밋
3f9ea3ed0a
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      interface/CBD/main.py

+ 2 - 0
interface/CBD/main.py

@@ -247,6 +247,8 @@ class InterfaceCore():
         if source and target:
             if self.mode not in ["Link", "InitialCondition"]:
                 print("Cannot create something not guaranteed to be link type!")
+            elif source == target:
+                print("Cannot create link to self")
             else:
                 global name
                 self.mv.instantiate_link(str(name), self.mode, source, target)