Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7163590
D4129.id14557.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D4129.id14557.diff
View Options
diff --git a/swh/web/browse/snapshot_context.py b/swh/web/browse/snapshot_context.py
--- a/swh/web/browse/snapshot_context.py
+++ b/swh/web/browse/snapshot_context.py
@@ -1000,7 +1000,6 @@
encoding=content_data.get("encoding"),
size=filesizeformat(content_data.get("length", 0)),
language=content_data.get("language"),
- licenses=content_data.get("licenses"),
root_directory=root_directory,
path=f"/{filepath}",
filename=filename,
diff --git a/swh/web/browse/utils.py b/swh/web/browse/utils.py
--- a/swh/web/browse/utils.py
+++ b/swh/web/browse/utils.py
@@ -152,13 +152,11 @@
content_data = service.lookup_content(query_string)
filetype = None
language = None
- license = None
# requests to the indexer db may fail so properly handle
# those cases in order to avoid content display errors
try:
filetype = service.lookup_content_filetype(query_string)
language = service.lookup_content_language(query_string)
- license = service.lookup_content_license(query_string)
except Exception as exc:
sentry_sdk.capture_exception(exc)
mimetype = "unknown"
@@ -217,10 +215,6 @@
content_data["language"] = language["lang"]
else:
content_data["language"] = "not detected"
- if license:
- content_data["licenses"] = ", ".join(license["facts"][0]["licenses"])
- else:
- content_data["licenses"] = "not detected"
return content_data
diff --git a/swh/web/browse/views/content.py b/swh/web/browse/views/content.py
--- a/swh/web/browse/views/content.py
+++ b/swh/web/browse/views/content.py
@@ -328,7 +328,6 @@
encoding=content_data["encoding"],
size=filesizeformat(content_data["length"]),
language=content_data["language"],
- licenses=content_data["licenses"],
root_directory=root_dir,
path=f"/{path}" if path else None,
filename=filename or "",
diff --git a/swh/web/common/typing.py b/swh/web/common/typing.py
--- a/swh/web/common/typing.py
+++ b/swh/web/common/typing.py
@@ -165,7 +165,6 @@
encoding: str
size: str
language: str
- licenses: str
path: Optional[str]
filename: Optional[str]
directory: Optional[str]
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jan 30 2025, 11:03 AM (6 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3228691
Attached To
D4129: browse: Do not lookup license info for a content as it is not used
Event Timeline
Log In to Comment