From: Christian Heimes Date: Mon, 28 Jan 2008 18:36:44 +0000 (+0000) Subject: Fixed two bugs in the bsddb tests. One was reported as #1956 X-Git-Tag: v3.0a3~145 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=087f8ae4cf34ec7653656f6d4a210bf2a532af9b;p=thirdparty%2FPython%2Fcpython.git Fixed two bugs in the bsddb tests. One was reported as #1956 --- diff --git a/Lib/bsddb/test/test_compare.py b/Lib/bsddb/test/test_compare.py index eefc7c291269..a36faae3600e 100644 --- a/Lib/bsddb/test/test_compare.py +++ b/Lib/bsddb/test/test_compare.py @@ -6,7 +6,7 @@ import shutil import sys, os, re from io import StringIO import tempfile -import test_all +from . import test_all import unittest try: diff --git a/Lib/bsddb/test/test_thread.py b/Lib/bsddb/test/test_thread.py index a347911e7da8..20a643bed46d 100644 --- a/Lib/bsddb/test/test_thread.py +++ b/Lib/bsddb/test/test_thread.py @@ -51,7 +51,7 @@ class BaseThreadedTestCase(unittest.TestCase): self.homeDir = homeDir try: os.mkdir(homeDir) - except OSError, e: + except OSError as e: if e.errno != errno.EEXIST: raise self.env = db.DBEnv() self.setEnvOpts() @@ -68,7 +68,7 @@ class BaseThreadedTestCase(unittest.TestCase): self.env.close() try: shutil.rmtree(self.homeDir) - except OSError, e: + except OSError as e: if e.errno != errno.EEXIST: raise def setEnvOpts(self):