Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion dns/py/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ def is_relevant(self, attributes):
def set(self, inputs, value):
if value > 0:
cf = inputs.configmap_yaml['data']['Corefile']
cfList = cf.decode().split("\n")
# fix the cf type so that it works also for python3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just update the code for Python 3? Isn't Python 2 deprecated?

Copy link
Contributor Author

@Tanzp01 Tanzp01 Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Bowei for the feedbacks! I have removed the line for python2, now only python3 supported for cleaner code

if(type(cf) == str):
cfList = cf.split("\n")
else:
cfList = cf.decode().split("\n")
cfList.insert(1,
" cache {\n"
" success " + repr(value) + "\n"
Expand Down
2 changes: 1 addition & 1 deletion dns/py/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def go(self):
self._create(inputs.deployment_yaml)
self._create(self.service_yaml)
if self.configmap_yaml is not None:
self._create(self.configmap_yaml)
self._create(inputs.configmap_yaml)
self._wait_for_status(True)
test_threads=[]
#Spawn off a thread to run the test case in each client pod simultaneously.
Expand Down