[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] Fixed invalid call on NoneType object in plugoo/tests.py, added exception catcher for import statement on BeautifulSoup module in tests/httphost.py



commit 53e2da3a296ecbac3bbdd6d80c525d1fb21af4c2
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxxxxxxxxx>
Date:   Fri Mar 23 15:23:40 2012 -0700

    Fixed invalid call on NoneType object in plugoo/tests.py, added exception catcher for import statement on BeautifulSoup module in tests/httphost.py
---
 plugoo/tests.py   |    5 +++--
 tests/httphost.py |    5 ++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/plugoo/tests.py b/plugoo/tests.py
index 3d6b36b..f7537de 100644
--- a/plugoo/tests.py
+++ b/plugoo/tests.py
@@ -78,8 +78,9 @@ class Test:
         if assets:
             self.logger.debug("Running through tests")
 
-            if extradata['index']:
-                index = extradata['index']
+            if extradata is not None:
+                if extradata['index']:
+                    index = extradata['index']
             else:
                 index = None
 
diff --git a/tests/httphost.py b/tests/httphost.py
index 6446e1f..0f33ca7 100644
--- a/tests/httphost.py
+++ b/tests/httphost.py
@@ -20,7 +20,10 @@ import httplib
 # appearing on the wire.
 monkey.patch_socket()
 
-from BeautifulSoup import BeautifulSoup
+try:
+    from BeautifulSoup import BeautifulSoup
+except:
+    print "BeautifulSoup-3.2.1 is missing. Try doing: # easy_install beautifulsoup"
 
 from plugoo.assets import Asset
 from plugoo.tests import Test



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits