From fffb3ae75b8225a9dc25bad9a544a2c825d89b7c Mon Sep 17 00:00:00 2001
From: david-sarah <david-sarah@jacaranda.org>
Date: Mon, 11 Apr 2011 12:07:38 -0700
Subject: [PATCH] Fix a test failure in test_package_initialization on Python
 2.4.x due to exceptions being stringified differently than in later versions
 of Python. refs #1389

---
 src/allmydata/__init__.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/allmydata/__init__.py b/src/allmydata/__init__.py
index 77973ab8..6bb20d81 100644
--- a/src/allmydata/__init__.py
+++ b/src/allmydata/__init__.py
@@ -188,7 +188,7 @@ def get_package_versions_and_locations():
                 module = sys.modules[modulename]
             except ImportError:
                 etype, emsg, etrace = sys.exc_info()
-                trace_info = (emsg, ([None] + traceback.extract_tb(etrace))[-1])
+                trace_info = (etype, str(emsg), ([None] + traceback.extract_tb(etrace))[-1])
                 packages.append( (pkgname, (None, None, trace_info)) )
             else:
                 if 'sqlite' in pkgname:
@@ -220,7 +220,7 @@ def check_requirement(req, vers_and_locs):
         return
     (actual, location, comment) = vers_and_locs[name]
     if actual is None:
-        # comment is (message, (filename, line number, function name, text)) for the original ImportError
+        # comment is (type, message, (filename, line number, function name, text)) for the original ImportError
         raise ImportError("for requirement %r: %s" % (req, comment))
     if actual == 'unknown':
         return
-- 
2.45.2