This is an automated email from the ASF dual-hosted git repository.
deacon-mp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/caldera.git
The following commit(s) were added to refs/heads/master by this push:
new c2c1d7ef Fix the building error with Python 3.14 (#3368) (#3372)
c2c1d7ef is described below
commit c2c1d7ef342b6aab3c8618f5ac94445f83580607
Author: Frédéric Fauberteau <[email protected]>
AuthorDate: Thu Jul 9 01:25:40 2026 +0200
Fix the building error with Python 3.14 (#3368) (#3372)
---
app/service/rest_svc.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/service/rest_svc.py b/app/service/rest_svc.py
index 2ef45f93..f879ca99 100644
--- a/app/service/rest_svc.py
+++ b/app/service/rest_svc.py
@@ -30,7 +30,11 @@ class RestService(RestServiceInterface, BaseService):
def __init__(self):
logging.getLogger('asyncio').setLevel(logging.WARNING)
self.log = self.add_service('rest_svc', self)
- self.loop = asyncio.get_event_loop()
+ try:
+ self.loop = asyncio.get_event_loop()
+ except RuntimeError:
+ self.loop = asyncio.new_event_loop()
+ asyncio.set_event_loop(self.loop)
async def persist_adversary(self, access, data):
"""Persist adversaries. Accepts single adversary or bulk set of
adversaries.