summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceSmartOS.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/sources/DataSourceSmartOS.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/sources/DataSourceSmartOS.py')
-rw-r--r--cloudinit/sources/DataSourceSmartOS.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/cloudinit/sources/DataSourceSmartOS.py b/cloudinit/sources/DataSourceSmartOS.py
index 6cbd8dfa..c7641eb3 100644
--- a/cloudinit/sources/DataSourceSmartOS.py
+++ b/cloudinit/sources/DataSourceSmartOS.py
@@ -40,13 +40,11 @@ import re
import socket
import stat
-import serial
-
from cloudinit import log as logging
+from cloudinit import serial
from cloudinit import sources
from cloudinit import util
-
LOG = logging.getLogger(__name__)
SMARTOS_ATTRIB_MAP = {