diff options
author | Benedikt Tutzer <e1225461@student.tuwien.ac.at> | 2018-08-20 14:44:03 +0200 |
---|---|---|
committer | Benedikt Tutzer <e1225461@student.tuwien.ac.at> | 2018-08-20 14:44:03 +0200 |
commit | 5864db3c2bf353d4ee124d35aa2f911c4249edbc (patch) | |
tree | 2c6962b3114b44f91b3fbe016b9afc5fb38f0a0f /kernel/python_wrappers.cc | |
parent | d79a2808cf2446fa21d91a6141f6fbe2318c03ec (diff) | |
download | yosys-5864db3c2bf353d4ee124d35aa2f911c4249edbc.tar.gz yosys-5864db3c2bf353d4ee124d35aa2f911c4249edbc.tar.bz2 yosys-5864db3c2bf353d4ee124d35aa2f911c4249edbc.zip |
Fixed issue when using a python plugin in the yosys shell
Diffstat (limited to 'kernel/python_wrappers.cc')
-rw-r--r-- | kernel/python_wrappers.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/kernel/python_wrappers.cc b/kernel/python_wrappers.cc index 197be0853..af1f80929 100644 --- a/kernel/python_wrappers.cc +++ b/kernel/python_wrappers.cc @@ -2783,10 +2783,13 @@ namespace YOSYS_PYTHON { struct Initializer { Initializer() { - Yosys::log_streams.push_back(&std::cout); - Yosys::log_error_stderr = true; - Yosys::yosys_setup(); - Yosys::yosys_banner(); + if(!Yosys::yosys_already_setup()) + { + Yosys::log_streams.push_back(&std::cout); + Yosys::log_error_stderr = true; + Yosys::yosys_setup(); + Yosys::yosys_banner(); + } } Initializer(Initializer const &) {} |