Skip to content

Commit 745e16a

Browse files
committed
removed not needed code
1 parent 6316bf5 commit 745e16a

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/handlers/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ async def get(self, *args, **kwargs):
816816
combined_data[i] = self.get_filtered_api(api_dict)
817817

818818
# Add url to metadata if api_details is set to 1
819-
if self.args.api_details == 1:
819+
if self.args.api_details:
820820
for data_dict in combined_data:
821821
if "metadata" in data_dict["api"]["smartapi"] and data_dict["api"]["smartapi"]["metadata"] is None:
822822
data_dict["api"]["smartapi"]["metadata"] = url

src/utils/metakg/parser.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import json
22
import logging
33
from copy import copy
4-
from utils.downloader import DownloadError
54
from utils.metakg.metakg_errors import MetadataRetrievalError
65
import requests
76

@@ -76,11 +75,7 @@ def get_TRAPI_with_metakg_endpoint(self, data=None, url=None):
7675
parser = API(smartapi_doc=data) if data else API(url=url)
7776

7877
# Download the metadata
79-
try:
80-
metadata = parser.metadata
81-
except DownloadError as dl_err:
82-
raise dl_err
83-
78+
metadata = parser.metadata
8479
_paths = metadata.get("paths", {})
8580
_team = metadata.get("x-translator", {}).get("team")
8681

0 commit comments

Comments
 (0)