From: Neal Norwitz Date: Wed, 25 Jan 2006 07:58:22 +0000 (+0000) Subject: Remove file even if non-existant X-Git-Tag: v2.4.3c1~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cf52a21e7a773e79312ac77657c78a032786717;p=thirdparty%2FPython%2Fcpython.git Remove file even if non-existant --- diff --git a/Lib/test/test_bsddb3.py b/Lib/test/test_bsddb3.py index 2d1bff76a717..34fbb82258aa 100644 --- a/Lib/test/test_bsddb3.py +++ b/Lib/test/test_bsddb3.py @@ -2,9 +2,10 @@ """ Run all test cases. """ +import os import sys import unittest -from test.test_support import requires, verbose, run_suite, unlink +from test.test_support import requires, verbose, run_suite # When running as a script instead of within the regrtest framework, skip the # requires test, since it's obvious we want to run them. @@ -27,7 +28,10 @@ def suite(): import bsddb.test.test_1413192 except: for f in ['__db.001', '__db.002', '__db.003', 'log.0000000001']: - unlink(f) + try: + os.unlink(f) + except OSError: + pass test_modules = [ 'test_associate',