From 087f8ae4cf34ec7653656f6d4a210bf2a532af9b Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 28 Jan 2008 18:36:44 +0000 Subject: [PATCH] Fixed two bugs in the bsddb tests. One was reported as #1956 --- Lib/bsddb/test/test_compare.py | 2 +- Lib/bsddb/test/test_thread.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/bsddb/test/test_compare.py b/Lib/bsddb/test/test_compare.py index eefc7c29126..a36faae3600 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 a347911e7da..20a643bed46 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):