]> jfr.im git - erebus.git/commitdiff
reddark - empty string if error
authorJohn Runyon <redacted>
Thu, 15 Jun 2023 21:59:37 +0000 (15:59 -0600)
committerJohn Runyon <redacted>
Thu, 15 Jun 2023 21:59:37 +0000 (15:59 -0600)
modules/reddark.py

index 22383e746b75ce4e0d8dfb60b00f33eab988bdc4..a1ea26f653c87bbde44ba494f2b9448018b5a515 100644 (file)
@@ -71,10 +71,10 @@ def getText(subreddit):
                e = e2
        if r is None:
                debug("Error getting text: " + repr(e))
-               return
+               return ''
        if r.status_code != 403:
                debug("Error getting text: " + str(r.status_code) + " (403 expected)")
-               return
+               return ''
        soup = BeautifulSoup(r.text, 'html.parser')
        elements = soup.find_all(class_='interstitial-subreddit-description')
        if len(elements):