Skip to content

Commit

Permalink
Fixing #125
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamgilbert committed Jun 29, 2017
1 parent e284f4c commit e8ca2a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sal/version.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>version</key>
<string>3.2.0.948</string>
<string>3.2.0.949</string>
</dict>
</plist>
13 changes: 8 additions & 5 deletions server/plugins/cryptstatus/cryptstatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,25 @@ def widget_content(self, page, machines=None, theid=None):
crypt_url = crypt_url.rstrip('/')
except:
crypt_url = None

serial = machines.serial
output = {}
date_escrowed = None
escrowed = None
request_url = crypt_url + '/verify/'+ serial + '/recovery_key/'
if crypt_url:
r = requests.get(request_url)
if r.status_code == requests.codes.ok:
output = r.json()
try:
r = requests.get(request_url)
if r.status_code == requests.codes.ok:
output = r.json()
except:
pass

if output != {}:
escrowed = output['escrowed']
if output['escrowed'] == True:
date_escrowed = parse_datetime(output['date_escrowed'])

c = Context({
'title': 'FileVault Escrow',
'date_escrowed': date_escrowed,
Expand Down

0 comments on commit e8ca2a7

Please sign in to comment.