DrTrigon has submitted this change and it was merged.

Change subject: bugfix; <type 'exceptions.AttributeError'>: 'NoneType' object 
has no attribute 'contents'
......................................................................


bugfix; <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 
'contents'

Change-Id: Icf8c8d9e2e2b42566fc3a9df4bbb527afd937a6c
---
M public_html/cgi-bin/filter.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  DrTrigon: Verified; Looks good to me, approved



diff --git a/public_html/cgi-bin/filter.py b/public_html/cgi-bin/filter.py
index 4d1b29c..124be2f 100755
--- a/public_html/cgi-bin/filter.py
+++ b/public_html/cgi-bin/filter.py
@@ -149,9 +149,9 @@
             bs          = BeautifulSoup.BeautifulSoup(unshort_buf)
             #if (bs.status.contents[0] == "1"):
             #    longurl  = str(bs.real.contents[0])
-            #if not bs.findAll('error'):
+            if not bs.findAll('error'):
             #    longurl  = str(bs.fullurl.contents[0])
-            if (bs.success.contents[0] == "true"):
+            #if (bs.success.contents[0] == "true"):
                 longurl  = str(bs.resolvedurl.contents[0])
                 page_buf = page_buf.replace(url, longurl)
 

-- 
To view, visit https://gerrit.wikimedia.org/r/104205
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf8c8d9e2e2b42566fc3a9df4bbb527afd937a6c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/bots/drtrigonbot
Gerrit-Branch: master
Gerrit-Owner: DrTrigon <[email protected]>
Gerrit-Reviewer: DrTrigon <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to