Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def issn(self, key, value):
try:
issn = normalize_issn(value['a'])
except KeyError:
return {}
b = value.get('b', '').lower()
if 'online' == b:
medium = 'online'
comment = ''
elif 'print' == b:
medium = 'print'
comment = ''
elif 'electronic' in b:
medium = 'online'
comment = 'electronic'
elif 'ebook' in b:
medium = 'online'
comment = 'ebook'