DrTrigon has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/104205


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(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/bots/drtrigonbot 
refs/changes/05/104205/1

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: newchange
Gerrit-Change-Id: Icf8c8d9e2e2b42566fc3a9df4bbb527afd937a6c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/bots/drtrigonbot
Gerrit-Branch: master
Gerrit-Owner: DrTrigon <[email protected]>

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

Reply via email to