lakshmivairamani commited on
Commit
3f56abd
·
verified ·
1 Parent(s): e603c05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -72,9 +72,10 @@ def get_ASN_data(asn_id):
72
  try:
73
  response = requests.get(complete_url)
74
  data = response.json()
 
75
  response.raise_for_status() # Raises an HTTPError if the response was an error
76
 
77
- if data["httpStatus"] != "200":
78
  # Assuming the first content item and first party item are what we're interested in
79
  content = data['result']['content'][0]
80
  trnHeaderAsn = content['trnHeaderAsn']
 
72
  try:
73
  response = requests.get(complete_url)
74
  data = response.json()
75
+ print (data)
76
  response.raise_for_status() # Raises an HTTPError if the response was an error
77
 
78
+ if data:
79
  # Assuming the first content item and first party item are what we're interested in
80
  content = data['result']['content'][0]
81
  trnHeaderAsn = content['trnHeaderAsn']