From 4fa2a860b4909f73ec1b3c995fddaf2d76ec7f44 Mon Sep 17 00:00:00 2001 From: Jordi Molina Date: Tue, 13 Sep 2016 19:50:34 +0200 Subject: [PATCH] More fixes for utf-8 handling --- RundeckLogfileCleanup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RundeckLogfileCleanup.py b/RundeckLogfileCleanup.py index 21bfb74..c0a1944 100644 --- a/RundeckLogfileCleanup.py +++ b/RundeckLogfileCleanup.py @@ -14,7 +14,7 @@ def get_projects(): try: url = URL + 'projects' r = requests.get(url, headers=HEADERS, verify=False,timeout=PROPERTIES['TIMEOUT']) - root = ET.fromstring(r.text) + root = ET.fromstring(r.text.encode('utf-8')) for project in root: for name in project.findall('name'): project_names.append(name.text)