gusmobile

Unnamed repository; edit this file 'description' to name the repository.
git clone git://code.clttr.info/gusmobile.git
Log | Files | Refs | LICENSE

commit 2530369d280f883c4820a2c3bb7fd61785bc4e7d
parent c8867e2a90165958ae58e444791c0003329c6501
Author: Natalie Pendragon <natpen@natpen.net>
Date:   Tue,  9 Jun 2020 06:53:08 -0400

Return lang

Diffstat:
Mgusmobile/client.py | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gusmobile/client.py b/gusmobile/client.py @@ -40,17 +40,19 @@ class Response: content = None content_type = None charset = None + lang = None url = None status = None status_meta = None prompt = None def __init__( - self, content=None, content_type=None, charset=None, url=None, status=None, status_meta=None, prompt=None + self, content=None, content_type=None, charset=None, lang=None, url=None, status=None, status_meta=None, prompt=None ): self.content = content self.content_type = content_type self.charset = charset + self.lang = lang self.url = url self.status = status self.status_meta = status_meta @@ -159,6 +161,7 @@ def fetch(raw_url): except LookupError: print("Header declared unknown encoding %s" % mime_options["charset"]) return + lang = mime_options["lang"] if "lang" in mime_options else None # Read the response body over the network try: body = f.read() @@ -177,6 +180,7 @@ def fetch(raw_url): content=content, content_type=mime, charset=charset, + lang=lang, url=url.geturl(), status=status, )