From 2c83c92e736baa3d11aa8776e48aa44102e15a30 Mon Sep 17 00:00:00 2001 From: Jiri Polansky Date: Thu, 13 Jun 2019 10:18:04 +0200 Subject: [PATCH] fix get_changeset_items method --- jenkinsapi/build.py | 10 ++++++---- setup.py | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/jenkinsapi/build.py b/jenkinsapi/build.py index 036f5def..ecc9617b 100644 --- a/jenkinsapi/build.py +++ b/jenkinsapi/build.py @@ -140,11 +140,13 @@ def get_changeset_items(self): } """ if 'changeSet' in self._data: - if 'items' in self._data['changeSet']: - return self._data['changeSet']['items'] + for i in self._data['changeSet']: + if 'items' in i: + return i['items'] elif 'changeSets' in self._data: - if 'items' in self._data['changeSets']: - return self._data['changeSets']['items'] + for i in self._data['changeSets']: + if 'items' in i: + return i['items'] return [] def _get_svn_rev(self): diff --git a/setup.py b/setup.py index c1c87847..73847d82 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +import os +os.environ['PBR_VERSION'] = '0.3.9.twisto.1' setup( setup_requires=['pbr'],