summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_power_state_change.py
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-01-21 18:02:42 -0500
committerChad Smith <chad.smith@canonical.com>2020-01-21 16:02:42 -0700
commitbb71a9d08d25193836eda91c328760305285574e (patch)
tree50a1f2f4a61e04255c5a8129e7a2a26d9d4cecd4 /cloudinit/config/cc_power_state_change.py
parent8c4fd886931abcf2cc8627a47463907d655b35c3 (diff)
downloadvyos-cloud-init-bb71a9d08d25193836eda91c328760305285574e.tar.gz
vyos-cloud-init-bb71a9d08d25193836eda91c328760305285574e.zip
Drop most of the remaining use of six (#179)
Diffstat (limited to 'cloudinit/config/cc_power_state_change.py')
-rw-r--r--cloudinit/config/cc_power_state_change.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/cloudinit/config/cc_power_state_change.py b/cloudinit/config/cc_power_state_change.py
index 43a479cf..3e81a3c7 100644
--- a/cloudinit/config/cc_power_state_change.py
+++ b/cloudinit/config/cc_power_state_change.py
@@ -49,16 +49,15 @@ key returns 0.
condition: <true/false/command>
"""
-from cloudinit.settings import PER_INSTANCE
-from cloudinit import util
-
import errno
import os
import re
-import six
import subprocess
import time
+from cloudinit.settings import PER_INSTANCE
+from cloudinit import util
+
frequency = PER_INSTANCE
EXIT_FAIL = 254
@@ -183,7 +182,7 @@ def load_power_state(cfg):
pstate['timeout'])
condition = pstate.get("condition", True)
- if not isinstance(condition, six.string_types + (list, bool)):
+ if not isinstance(condition, (str, list, bool)):
raise TypeError("condition type %s invalid. must be list, bool, str")
return (args, timeout, condition)