diff options
author | Chad Smith <chad.smith@canonical.com> | 2018-03-28 12:29:04 -0600 |
---|---|---|
committer | Chad Smith <chad.smith@canonical.com> | 2018-03-28 12:29:04 -0600 |
commit | cf3eaed2e01062f9b5d47042d7a76b092970e0cf (patch) | |
tree | 53f7c52c5a76bb586da0483699fd6d188e72f457 /tests/cloud_tests/util.py | |
parent | 9f159f3a55a7bba7868e03d9cccd898678381f03 (diff) | |
parent | 8caa3bcf8f2c5b3a448b9d892d4cf53ed8db9be9 (diff) | |
download | vyos-cloud-init-cf3eaed2e01062f9b5d47042d7a76b092970e0cf.tar.gz vyos-cloud-init-cf3eaed2e01062f9b5d47042d7a76b092970e0cf.zip |
merge from master at 18.2
Diffstat (limited to 'tests/cloud_tests/util.py')
-rw-r--r-- | tests/cloud_tests/util.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/cloud_tests/util.py b/tests/cloud_tests/util.py index 6ff285e7..3dd4996d 100644 --- a/tests/cloud_tests/util.py +++ b/tests/cloud_tests/util.py @@ -460,6 +460,10 @@ class PlatformError(IOError): IOError.__init__(self, message) +def mkdtemp(prefix='cloud_test_data'): + return tempfile.mkdtemp(prefix=prefix) + + class TempDir(object): """Configurable temporary directory like tempfile.TemporaryDirectory.""" @@ -480,7 +484,7 @@ class TempDir(object): @return_value: tempdir path """ if not self.tmpdir: - self.tmpdir = tempfile.mkdtemp(prefix=self.prefix) + self.tmpdir = mkdtemp(prefix=self.prefix) LOG.debug('using tmpdir: %s', self.tmpdir) return self.tmpdir |