summaryrefslogtreecommitdiff
path: root/cloudinit/cs_utils.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-05-11 16:47:50 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-05-11 16:47:50 -0700
commit12d7ee2cb6589b866ab26b508b15c65326481d6c (patch)
tree397fb383c718d52929f70fc54402f865187120a4 /cloudinit/cs_utils.py
parente885f694c9951101b57ee182bebc000e398da563 (diff)
downloadvyos-cloud-init-12d7ee2cb6589b866ab26b508b15c65326481d6c.tar.gz
vyos-cloud-init-12d7ee2cb6589b866ab26b508b15c65326481d6c.zip
Use a fake serial module that will allow tests to contine
Instead of aborting all serial using tests instead just create a serial module in cloudinit that will create a fake and broken serial class when pyserial is not actually installed. This allows for using the datasource and tests that exist in a more functional and tested manner (even when pyserial is not found).
Diffstat (limited to 'cloudinit/cs_utils.py')
-rw-r--r--cloudinit/cs_utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/cs_utils.py b/cloudinit/cs_utils.py
index 83ac1a0e..412431f2 100644
--- a/cloudinit/cs_utils.py
+++ b/cloudinit/cs_utils.py
@@ -33,7 +33,8 @@ API Docs: http://cloudsigma-docs.readthedocs.org/en/latest/server_context.html
import json
import platform
-import serial
+from cloudinit import serial
+
# these high timeouts are necessary as read may read a lot of data.
READ_TIMEOUT = 60