Skip to content

Commit

Permalink
Inverse tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmaitrepierre committed May 20, 2020
1 parent c4668ce commit a5307d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stormshield/sns/sslclient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,14 +515,14 @@ def send_command(self, command):
if serverd_code == self.SERVERD_WAIT_DOWNLOAD:
data = serverd.find('data')
# keep size and crc for further verification
if data.get('format') == 'raw':
self.dl_size = int(data.find('size').text)
self.dl_crc = data.find('crc').text
else:
if data.get('format') == 'section':
key = data.find('section').find('key')
values = key.get('value').split(',')
self.dl_size = int(values[2].split('=')[1])
self.dl_crc = values[1].split('=')[1]
else:
self.dl_size = int(data.find('size').text)
self.dl_crc = data.find('crc').text
if filename:
return self.download(filename)
return response
Expand Down

0 comments on commit a5307d0

Please sign in to comment.