Skip to content

Commit

Permalink
Merge pull request #7 from TwistoPayments/fix-get-changesets
Browse files Browse the repository at this point in the history
fix get_changeset_items method
  • Loading branch information
Jiri Polansky authored Jun 13, 2019
2 parents 2398927 + 2c83c92 commit 851b5b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions jenkinsapi/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from setuptools import setup
import os

os.environ['PBR_VERSION'] = '0.3.9.twisto.1'

setup(
setup_requires=['pbr'],
Expand Down

0 comments on commit 851b5b7

Please sign in to comment.