summaryrefslogtreecommitdiff
path: root/cloudinit/tests/helpers.py
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-03-31 16:32:40 -0400
committerGitHub <noreply@github.com>2020-03-31 16:32:40 -0400
commitb698b349c827f30fa60de55e2469a21ae4342669 (patch)
tree91d76d0bc508d39b4de8ee6a06a0e3dcb245cb96 /cloudinit/tests/helpers.py
parentc478d0bff412c67280dfe8f08568de733f9425a1 (diff)
downloadvyos-cloud-init-b698b349c827f30fa60de55e2469a21ae4342669.tar.gz
vyos-cloud-init-b698b349c827f30fa60de55e2469a21ae4342669.zip
CiTestCase: stop using and remove sys_exit helper (#283)
This shim was required to support Python 2.6, so we no longer need it.
Diffstat (limited to 'cloudinit/tests/helpers.py')
-rw-r--r--cloudinit/tests/helpers.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/cloudinit/tests/helpers.py b/cloudinit/tests/helpers.py
index 8d3512db..f4db5827 100644
--- a/cloudinit/tests/helpers.py
+++ b/cloudinit/tests/helpers.py
@@ -197,16 +197,6 @@ class CiTestCase(TestCase):
dir = self.tmp_dir()
return os.path.normpath(os.path.abspath(os.path.join(dir, path)))
- def sys_exit(self, code):
- """Provide a wrapper around sys.exit for python 2.6
-
- In 2.6, this code would produce 'cm.exception' with value int(2)
- rather than the SystemExit that was raised by sys.exit(2).
- with assertRaises(SystemExit) as cm:
- sys.exit(2)
- """
- raise SystemExit(code)
-
def tmp_cloud(self, distro, sys_cfg=None, metadata=None):
"""Create a cloud with tmp working directory paths.