Skip to content

Commit

Permalink
Merge pull request #61 from theMiddleBlue/v2.3/master
Browse files Browse the repository at this point in the history
fix scaninfo issue #49
  • Loading branch information
theMiddleBlue authored Dec 17, 2018
2 parents 63f0149 + dddf7ea commit 80a6444
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 80a6444

Please sign in to comment.