Commit 8adfb04d authored by Jeffrey Shell's avatar Jeffrey Shell

Collector issue #2461: Changed another use of os.system() to a

glob()/os.remove() pair.  Pointed out by Chris Withers.
parent 610b3a9f
...@@ -83,21 +83,19 @@ ...@@ -83,21 +83,19 @@
# #
############################################################################## ##############################################################################
import sys, os import sys, os, glob, unittest
sys.path.insert(0, os.getcwd()) sys.path.insert(0, os.getcwd())
try: import unittest try: import zLOG
except: except:
sys.path[0]=os.path.join(sys.path[0],'..','..') sys.path[0]=os.path.join(sys.path[0],'..','..')
import unittest import zLOG
class Dummy: class Dummy:
def __init__(self, **kw): def __init__(self, **kw):
self.__dict__.update(kw) self.__dict__.update(kw)
import zLOG
def log_write(subsystem, severity, summary, detail, error): def log_write(subsystem, severity, summary, detail, error):
if severity >= zLOG.PROBLEM: if severity >= zLOG.PROBLEM:
assert 0, "%s(%s): %s" % (subsystem, severity, summary) assert 0, "%s(%s): %s" % (subsystem, severity, summary)
...@@ -134,7 +132,8 @@ class Tests(unittest.TestCase): ...@@ -134,7 +132,8 @@ class Tests(unittest.TestCase):
get_transaction().abort() get_transaction().abort()
if hasattr(self, 'jar'): if hasattr(self, 'jar'):
self.dbclose() self.dbclose()
os.system('rm -f fs_tmp__*') for fn in glob.glob('fs_tmp__*'):
os.remove(fn)
def checkSimpleAddDelete(self): def checkSimpleAddDelete(self):
"Check that we can add and delete an object without error" "Check that we can add and delete an object without error"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment