Skip to content

Commit

Permalink
Added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmaitrepierre committed May 20, 2020
1 parent a5307d0 commit 644e85c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stormshield/sns/sslclient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,13 @@ def send_command(self, command):
data = serverd.find('data')
# keep size and crc for further verification
if data.get('format') == 'section':
# <data format="section"><section title="Result"><key name="format" value="base64,crc=923B2C86,size=952"/>
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:
# <data format="raw"><crc>439B852</crc><size>5096
self.dl_size = int(data.find('size').text)
self.dl_crc = data.find('crc').text
if filename:
Expand Down

0 comments on commit 644e85c

Please sign in to comment.