]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove file even if non-existant
authorNeal Norwitz <nnorwitz@gmail.com>
Wed, 25 Jan 2006 07:58:22 +0000 (07:58 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Wed, 25 Jan 2006 07:58:22 +0000 (07:58 +0000)
Lib/test/test_bsddb3.py

index 2d1bff76a7172fb202d920b35644d79bf287624a..34fbb82258aa7bd272f254ca8b31960485804097 100644 (file)
@@ -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',