Skip to content

Commit

Permalink
fix scaninfo issue #49
Browse files Browse the repository at this point in the history
  • Loading branch information
theMiddleBlue committed Dec 17, 2018
1 parent 5ee7ad2 commit dddf7ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,19 +285,19 @@ def reportPDFView(request):
scantitle = m.group(1).replace('.xml','').replace('_',' ')

scantype = ''
if '@type' in o['scaninfo']:
if 'scaninfo' in o and '@type' in o['scaninfo']:
scantype = o['scaninfo']['@type']

if type(o['scaninfo']) is list:
if 'scaninfo' in o and type(o['scaninfo']) is list:
for sinfo in o['scaninfo']:
scantype += sinfo['@type']+', '
scantype = scantype[0:-2]

protocol = ''
if '@protocol' in o['scaninfo']:
if 'scaninfo' in o and '@protocol' in o['scaninfo']:
protocol = o['scaninfo']['@protocol']

if type(o['scaninfo']) is list:
if 'scaninfo' in o and type(o['scaninfo']) is list:
for sinfo in o['scaninfo']:
protocol += sinfo['@protocol']+', '
protocol = protocol[0:-2]
Expand Down

0 comments on commit dddf7ea

Please sign in to comment.