Fix issue with non-ascii characters in get_job_md5

The xml string needs to be encoded to utf-8
before passing it to the hash function.

Change-Id: I4b6ca7ef459b48a2ba56f788fe37307ee381ced4
Story: 2000488
This commit is contained in:
Joakim Löfgren 2016-02-22 12:50:47 +01:00
parent af16f44439
commit aa3bf5cc19

@ -158,7 +158,7 @@ class Jenkins(object):
def get_job_md5(self, job_name):
xml = self.jenkins.get_job_config(job_name)
return hashlib.md5(xml).hexdigest()
return hashlib.md5(xml.encode('utf-8')).hexdigest()
def delete_job(self, job_name):
if self.is_job(job_name):