diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-14 16:40:13 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-14 16:40:13 -0700 |
commit | 1d3b4759b419fb4973d9f43c4a58ed7e8f8d7814 (patch) | |
tree | b7566667128fcbe3aab202ce7bde308cdb8cb969 /pym/portage | |
parent | 832c4045ab5c6d7fd118dabb9993d36301175ba0 (diff) | |
download | portage-1d3b4759b419fb4973d9f43c4a58ed7e8f8d7814.tar.gz portage-1d3b4759b419fb4973d9f43c4a58ed7e8f8d7814.tar.bz2 portage-1d3b4759b419fb4973d9f43c4a58ed7e8f8d7814.zip |
Make IpcDaemonTestCase use a finally block to unlock PORTAGE_BUILDDIR.v2.2_rc82
Diffstat (limited to 'pym/portage')
-rw-r--r-- | pym/portage/tests/ebuild/test_ipc_daemon.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/tests/ebuild/test_ipc_daemon.py b/pym/portage/tests/ebuild/test_ipc_daemon.py index 4c9a614f8..b5b4796e1 100644 --- a/pym/portage/tests/ebuild/test_ipc_daemon.py +++ b/pym/portage/tests/ebuild/test_ipc_daemon.py @@ -23,6 +23,7 @@ class IpcDaemonTestCase(TestCase): def testIpcDaemon(self): tmpdir = tempfile.mkdtemp() + build_dir = None try: env = {} @@ -117,6 +118,7 @@ class IpcDaemonTestCase(TestCase): self.assertEqual(daemon.isAlive(), False) self.assertEqual(proc.returncode == os.EX_OK, False) - build_dir.unlock() finally: + if build_dir is not None: + build_dir.unlock() shutil.rmtree(tmpdir) |