diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-01-29 14:32:51 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-01-29 14:32:51 -0500 |
commit | 3cfe9b3d8958b1a4e450d5ff31d805c424945027 (patch) | |
tree | b05977c13f4d8dbdb111b7392e2a5689ad381b84 /tests/unittests/helpers.py | |
parent | 06c80d8b0dcb8cf1013885fc745bf48d57b39ce4 (diff) | |
parent | 29b56e5ad6a5ec0eedbedcc598f633b1f5302a8a (diff) | |
download | vyos-cloud-init-3cfe9b3d8958b1a4e450d5ff31d805c424945027.tar.gz vyos-cloud-init-3cfe9b3d8958b1a4e450d5ff31d805c424945027.zip |
DataSourceNoCloud: support reading vendor-data
Here we add the ability to read vendor-data from a file named
vendor-data at the same location as the user-data and meta-data files.
At the moment, vendor-data is not read at all from 'seedfrom'.
Diffstat (limited to 'tests/unittests/helpers.py')
-rw-r--r-- | tests/unittests/helpers.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unittests/helpers.py b/tests/unittests/helpers.py index c0da0983..5b4f4208 100644 --- a/tests/unittests/helpers.py +++ b/tests/unittests/helpers.py @@ -187,7 +187,8 @@ class FilesystemMockingTestCase(ResourceUsingTestCase): def populate_dir(path, files): - os.makedirs(path) + if not os.path.exists(path): + os.makedirs(path) for (name, content) in files.iteritems(): with open(os.path.join(path, name), "w") as fp: fp.write(content) |