X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fmrstub%2Fapp%2Fmain.py;h=75364354fb97201d8aafdc64c7d3d63b69c8adec;hb=c8f92e94bb2638aa66a1d7c2ba63375bbfcdc8c9;hp=4b1913f720e2c170eda162e38d6a7a636ca3d9a4;hpb=afe34e22e0be919b8e054826c23c551b4e493f79;p=nonrtric.git diff --git a/test/mrstub/app/main.py b/test/mrstub/app/main.py index 4b1913f7..75364354 100644 --- a/test/mrstub/app/main.py +++ b/test/mrstub/app/main.py @@ -164,7 +164,8 @@ def dmaap_generic_uploader(): while True: if (len(generic_messages)): - for topicname in generic_messages.keys(): #topicname contains the path of the topics, eg. "/event/" + keys_copy = list(generic_messages.keys()) + for topicname in keys_copy: #topicname contains the path of the topics, eg. "/event/" topic_queue=generic_messages[topicname] if (len(topic_queue)>0): if (topicname.endswith(".text")): @@ -581,7 +582,7 @@ if os.getenv("TOPIC_READ") is not None: uploader_thread=Thread(target=dmaap_uploader) uploader_thread.start() -if os.environ['GENERIC_TOPICS_UPLOAD_BASEURL'] is not None: +if 'GENERIC_TOPICS_UPLOAD_BASEURL' in os.environ: print("GENERIC_TOPICS_UPLOAD_BASEURL:"+os.environ['GENERIC_TOPICS_UPLOAD_BASEURL']) generic_topics_upload_baseurl=os.environ['GENERIC_TOPICS_UPLOAD_BASEURL'] if generic_topics_upload_baseurl and generic_uploader_thread is None: