1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00

remove conditional code for old snakes (#11048)

* remove conditional code for old snakes

* remove conditional code for old snakes

* reformat

* add changelog frag
This commit is contained in:
Alexei Znamensky 2025-11-09 05:21:46 +13:00 committed by GitHub
parent 3478863ef0
commit ebf45260ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 26 additions and 105 deletions

View file

@ -145,7 +145,6 @@ configured:
type: bool
"""
import sys
import traceback
from xml.etree import ElementTree as et
@ -160,9 +159,6 @@ with deps.declare(
import jenkins
IS_PYTHON_2 = sys.version_info[0] <= 2
class JenkinsNode:
def __init__(self, module: AnsibleModule) -> None:
self.module = module
@ -246,10 +242,7 @@ class JenkinsNode:
configured = True
if configured:
if IS_PYTHON_2:
data = et.tostring(root)
else:
data = et.tostring(root, encoding="unicode")
data = et.tostring(root, encoding="unicode")
self.instance.reconfig_node(self.name, data)