summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_ssh.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-08-22 14:12:32 -0400
committerScott Moser <smoser@ubuntu.com>2012-08-22 14:12:32 -0400
commit451e48732ff7885502db2f8296777fa58b670f3b (patch)
treecf2578bd0ba2849525e44b58b0bfce49f40ec2fe /cloudinit/config/cc_ssh.py
parent49242c2a2e7e0ab6812de741b4ac2e8d1888ad08 (diff)
downloadvyos-cloud-init-451e48732ff7885502db2f8296777fa58b670f3b.tar.gz
vyos-cloud-init-451e48732ff7885502db2f8296777fa58b670f3b.zip
fix pep8 complaints.
make pep8 now is silent on precise's pep8 ( 0.6.1-2ubuntu2).
Diffstat (limited to 'cloudinit/config/cc_ssh.py')
-rw-r--r--cloudinit/config/cc_ssh.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/config/cc_ssh.py b/cloudinit/config/cc_ssh.py
index 4019ae90..3431bd2a 100644
--- a/cloudinit/config/cc_ssh.py
+++ b/cloudinit/config/cc_ssh.py
@@ -18,11 +18,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import os
import glob
+import os
-from cloudinit import util
from cloudinit import ssh_util
+from cloudinit import util
DISABLE_ROOT_OPTS = ("no-port-forwarding,no-agent-forwarding,"
"no-X11-forwarding,command=\"echo \'Please login as the user \\\"$USER\\\" "
@@ -76,7 +76,7 @@ def handle(_name, cfg, cloud, log, _args):
pair = (KEY_2_FILE[priv][0], KEY_2_FILE[pub][0])
cmd = ['sh', '-xc', KEY_GEN_TPL % pair]
try:
- # TODO: Is this guard needed?
+ # TODO(harlowja): Is this guard needed?
with util.SeLinuxGuard("/etc/ssh", recursive=True):
util.subp(cmd, capture=False)
log.debug("Generated a key for %s from %s", pair[0], pair[1])
@@ -94,7 +94,7 @@ def handle(_name, cfg, cloud, log, _args):
if not os.path.exists(keyfile):
cmd = ['ssh-keygen', '-t', keytype, '-N', '', '-f', keyfile]
try:
- # TODO: Is this guard needed?
+ # TODO(harlowja): Is this guard needed?
with util.SeLinuxGuard("/etc/ssh", recursive=True):
util.subp(cmd, capture=False)
except: