commit: fa98ecd4558c47e138fca0b55931381cb4dd3fac
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 9 14:23:20 2025 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sat Aug 9 14:24:44 2025 +0000
URL: https://gitweb.gentoo.org/proj/R_overlay.git/commit/?id=fa98ecd4
roverlay/remote/websync.py: default the content type of PACKAGE.
If a PACKAGE file is just a plain text file served, it is text/plain.
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
roverlay/remote/websync.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/roverlay/remote/websync.py b/roverlay/remote/websync.py
index 06689ad..5bc774f 100644
--- a/roverlay/remote/websync.py
+++ b/roverlay/remote/websync.py
@@ -532,7 +532,8 @@ class WebsyncRepo ( WebsyncBase ):
) as webh:
content_type = webh.info().get ( 'content-type', None )
- if content_type != 'text/plain':
+ # A page without content_type is just text/plain.
+ if content_type != 'text/plain' and (content_type is not None):
print (
"content type {!r} is not supported!".format ( content_type )
)