Skip to content

Commit

Permalink
Merge branch 'fix_385' of https://github.com/lethliel/osc
Browse files Browse the repository at this point in the history
Fix for python26, since it does not support an epath/xpath like
.//entry[@hash].

Fixes: #385 ("osc 0.162.x does not work anymore on SLE11")
  • Loading branch information
marcus-h committed Feb 23, 2018
2 parents 0ddb598 + e017a8e commit 5fb71aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions osc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1503,9 +1503,10 @@ def commit(self, msg='', verbose=False, skip_local_service_run=False, can_branch
print('Transmitting file data', end=' ')
filelist = self.__generate_commitlist(todo_send)
sfilelist = self.__send_commitlog(msg, filelist, validate=True)
if sfilelist.get('error') and sfilelist.findall('.//entry[@hash]'):
hash_entries = [e for e in sfilelist.findall('entry') if e.get('hash') is not None]
if sfilelist.get('error') and hash_entries:
name2elem = dict([(e.get('name'), e) for e in filelist.findall('entry')])
for entry in sfilelist.findall('.//entry[@hash]'):
for entry in hash_entries:
filename = entry.get('name')
fileelem = name2elem.get(filename)
if filename not in sha256sums:
Expand Down

0 comments on commit 5fb71aa

Please sign in to comment.