diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-01-12 16:50:56 +0100 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-01-12 16:50:56 +0100 |
commit | df5d51c25523ea04d45f5f077e94885d1847e526 (patch) | |
tree | 9661558e70924c45ea928452f2593623255e2ae7 | |
parent | 32f1967029e0b7d5f861296e4c2a05afb85745b3 (diff) | |
download | vyos-cloud-init-df5d51c25523ea04d45f5f077e94885d1847e526.tar.gz vyos-cloud-init-df5d51c25523ea04d45f5f077e94885d1847e526.zip |
[PATCH 04/13] Fix pylint warnings W0611 (unused import)
From: Juerg Haefliger <juerg.haefliger@hp.com>
-rwxr-xr-x | cloud-init-cfg.py | 1 | ||||
-rwxr-xr-x | cloud-init-query.py | 3 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_chef.py | 5 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_foo.py | 6 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_grub_dpkg.py | 2 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_mcollective.py | 4 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_resizefs.py | 2 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_rightscale_userdata.py | 3 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_rsyslog.py | 2 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_runcmd.py | 2 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_scripts_per_boot.py | 5 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_scripts_per_instance.py | 5 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_scripts_per_once.py | 5 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_scripts_user.py | 5 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_set_hostname.py | 2 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_set_passwords.py | 2 | ||||
-rw-r--r-- | cloudinit/CloudConfig/cc_timezone.py | 2 | ||||
-rw-r--r-- | cloudinit/DataSourceEc2.py | 5 | ||||
-rw-r--r-- | cloudinit/DataSourceNoCloud.py | 6 | ||||
-rw-r--r-- | cloudinit/DataSourceOVF.py | 2 | ||||
-rw-r--r-- | cloudinit/UserDataHandler.py | 2 |
21 files changed, 29 insertions, 42 deletions
diff --git a/cloud-init-cfg.py b/cloud-init-cfg.py index 2930cd88..de64ef9c 100755 --- a/cloud-init-cfg.py +++ b/cloud-init-cfg.py @@ -23,7 +23,6 @@ import cloudinit.util as util import cloudinit.CloudConfig as CC import logging import os -import traceback def Usage(out = sys.stdout): out.write("Usage: %s name\n" % sys.argv[0]) diff --git a/cloud-init-query.py b/cloud-init-query.py index 3e8c24ab..d4b61a2b 100755 --- a/cloud-init-query.py +++ b/cloud-init-query.py @@ -20,9 +20,6 @@ import sys import cloudinit import cloudinit.CloudConfig -import logging -import os -import traceback def Usage(out = sys.stdout): out.write("Usage: %s name\n" % sys.argv[0]) diff --git a/cloudinit/CloudConfig/cc_chef.py b/cloudinit/CloudConfig/cc_chef.py index f093d0b2..08a9f40e 100644 --- a/cloudinit/CloudConfig/cc_chef.py +++ b/cloudinit/CloudConfig/cc_chef.py @@ -14,13 +14,10 @@ # # 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 pwd -import socket import subprocess import json -import StringIO -import ConfigParser import cloudinit.CloudConfig as cc import cloudinit.util as util diff --git a/cloudinit/CloudConfig/cc_foo.py b/cloudinit/CloudConfig/cc_foo.py index fb14707e..c15e8d75 100644 --- a/cloudinit/CloudConfig/cc_foo.py +++ b/cloudinit/CloudConfig/cc_foo.py @@ -15,10 +15,12 @@ # # 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 cloudinit -import cloudinit.util as util + +#import cloudinit +#import cloudinit.util as util from cloudinit.CloudConfig import per_instance frequency = per_instance + def handle(name,cfg,cloud,log,args): print "hi" diff --git a/cloudinit/CloudConfig/cc_grub_dpkg.py b/cloudinit/CloudConfig/cc_grub_dpkg.py index b26e90e8..588f1403 100644 --- a/cloudinit/CloudConfig/cc_grub_dpkg.py +++ b/cloudinit/CloudConfig/cc_grub_dpkg.py @@ -15,8 +15,8 @@ # # 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 cloudinit.util as util -import subprocess import traceback import os diff --git a/cloudinit/CloudConfig/cc_mcollective.py b/cloudinit/CloudConfig/cc_mcollective.py index c7912aa4..656dd406 100644 --- a/cloudinit/CloudConfig/cc_mcollective.py +++ b/cloudinit/CloudConfig/cc_mcollective.py @@ -16,11 +16,9 @@ # # 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 pwd -import socket import subprocess -import fileinput import StringIO import ConfigParser import cloudinit.CloudConfig as cc diff --git a/cloudinit/CloudConfig/cc_resizefs.py b/cloudinit/CloudConfig/cc_resizefs.py index d3a22fd6..83062642 100644 --- a/cloudinit/CloudConfig/cc_resizefs.py +++ b/cloudinit/CloudConfig/cc_resizefs.py @@ -15,9 +15,9 @@ # # 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 cloudinit.util as util import subprocess -import traceback import os import stat import tempfile diff --git a/cloudinit/CloudConfig/cc_rightscale_userdata.py b/cloudinit/CloudConfig/cc_rightscale_userdata.py index 4875acbe..ce0c2fe9 100644 --- a/cloudinit/CloudConfig/cc_rightscale_userdata.py +++ b/cloudinit/CloudConfig/cc_rightscale_userdata.py @@ -32,8 +32,9 @@ ## Therefore, this must run before that. ## ## + import cloudinit.util as util -from cloudinit.CloudConfig import per_once, per_always, per_instance +from cloudinit.CloudConfig import per_instance from cloudinit import get_ipath_cur from urlparse import parse_qs diff --git a/cloudinit/CloudConfig/cc_rsyslog.py b/cloudinit/CloudConfig/cc_rsyslog.py index a8ee8476..dfd72c33 100644 --- a/cloudinit/CloudConfig/cc_rsyslog.py +++ b/cloudinit/CloudConfig/cc_rsyslog.py @@ -15,10 +15,10 @@ # # 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 cloudinit import logging import cloudinit.util as util -import subprocess import traceback DEF_FILENAME = "20-cloud-config.conf" diff --git a/cloudinit/CloudConfig/cc_runcmd.py b/cloudinit/CloudConfig/cc_runcmd.py index f030980a..633f411b 100644 --- a/cloudinit/CloudConfig/cc_runcmd.py +++ b/cloudinit/CloudConfig/cc_runcmd.py @@ -15,7 +15,7 @@ # # 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 cloudinit + import cloudinit.util as util def handle(name,cfg,cloud,log,args): diff --git a/cloudinit/CloudConfig/cc_scripts_per_boot.py b/cloudinit/CloudConfig/cc_scripts_per_boot.py index 4e407fb7..2af060af 100644 --- a/cloudinit/CloudConfig/cc_scripts_per_boot.py +++ b/cloudinit/CloudConfig/cc_scripts_per_boot.py @@ -15,9 +15,10 @@ # # 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 cloudinit.util as util -from cloudinit.CloudConfig import per_once, per_always, per_instance -from cloudinit import get_cpath, get_ipath_cur +from cloudinit.CloudConfig import per_always +from cloudinit import get_cpath frequency = per_always runparts_path = "%s/%s" % (get_cpath(), "scripts/per-boot") diff --git a/cloudinit/CloudConfig/cc_scripts_per_instance.py b/cloudinit/CloudConfig/cc_scripts_per_instance.py index 22b41185..e00f5e7b 100644 --- a/cloudinit/CloudConfig/cc_scripts_per_instance.py +++ b/cloudinit/CloudConfig/cc_scripts_per_instance.py @@ -15,9 +15,10 @@ # # 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 cloudinit.util as util -from cloudinit.CloudConfig import per_once, per_always, per_instance -from cloudinit import get_cpath, get_ipath_cur +from cloudinit.CloudConfig import per_instance +from cloudinit import get_cpath frequency = per_instance runparts_path = "%s/%s" % (get_cpath(), "scripts/per-instance") diff --git a/cloudinit/CloudConfig/cc_scripts_per_once.py b/cloudinit/CloudConfig/cc_scripts_per_once.py index 9d752325..3c1a151b 100644 --- a/cloudinit/CloudConfig/cc_scripts_per_once.py +++ b/cloudinit/CloudConfig/cc_scripts_per_once.py @@ -15,9 +15,10 @@ # # 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 cloudinit.util as util -from cloudinit.CloudConfig import per_once, per_always, per_instance -from cloudinit import get_cpath, get_ipath_cur +from cloudinit.CloudConfig import per_once +from cloudinit import get_cpath frequency = per_once runparts_path = "%s/%s" % (get_cpath(), "scripts/per-once") diff --git a/cloudinit/CloudConfig/cc_scripts_user.py b/cloudinit/CloudConfig/cc_scripts_user.py index bafecd23..2f44b66b 100644 --- a/cloudinit/CloudConfig/cc_scripts_user.py +++ b/cloudinit/CloudConfig/cc_scripts_user.py @@ -15,9 +15,10 @@ # # 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 cloudinit.util as util -from cloudinit.CloudConfig import per_once, per_always, per_instance -from cloudinit import get_cpath, get_ipath_cur +from cloudinit.CloudConfig import per_instance +from cloudinit import get_ipath_cur frequency = per_instance runparts_path = "%s/%s" % (get_ipath_cur(), "scripts") diff --git a/cloudinit/CloudConfig/cc_set_hostname.py b/cloudinit/CloudConfig/cc_set_hostname.py index bc190049..1a70d9e0 100644 --- a/cloudinit/CloudConfig/cc_set_hostname.py +++ b/cloudinit/CloudConfig/cc_set_hostname.py @@ -15,8 +15,8 @@ # # 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 cloudinit.util as util -import subprocess def handle(name,cfg,cloud,log,args): if util.get_cfg_option_bool(cfg,"preserve_hostname",False): diff --git a/cloudinit/CloudConfig/cc_set_passwords.py b/cloudinit/CloudConfig/cc_set_passwords.py index edfbaeeb..c7fa4d64 100644 --- a/cloudinit/CloudConfig/cc_set_passwords.py +++ b/cloudinit/CloudConfig/cc_set_passwords.py @@ -15,8 +15,8 @@ # # 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 cloudinit.util as util -import subprocess import sys import random import string diff --git a/cloudinit/CloudConfig/cc_timezone.py b/cloudinit/CloudConfig/cc_timezone.py index e8a453f9..9a6e50d1 100644 --- a/cloudinit/CloudConfig/cc_timezone.py +++ b/cloudinit/CloudConfig/cc_timezone.py @@ -15,9 +15,9 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. + from cloudinit.CloudConfig import per_instance from cloudinit import util -import subprocess import os.path import shutil diff --git a/cloudinit/DataSourceEc2.py b/cloudinit/DataSourceEc2.py index aee10ffa..eed310c9 100644 --- a/cloudinit/DataSourceEc2.py +++ b/cloudinit/DataSourceEc2.py @@ -18,16 +18,13 @@ import DataSource -from cloudinit import seeddir, log +from cloudinit import seeddir, log # pylint: disable=W0611 import cloudinit.util as util import socket import urllib2 import time -import sys import boto.utils as boto_utils import os.path -import errno -import urlparse class DataSourceEc2(DataSource.DataSource): api_ver = '2009-04-04' diff --git a/cloudinit/DataSourceNoCloud.py b/cloudinit/DataSourceNoCloud.py index af99fc2b..2f4bd604 100644 --- a/cloudinit/DataSourceNoCloud.py +++ b/cloudinit/DataSourceNoCloud.py @@ -18,12 +18,8 @@ import DataSource -from cloudinit import seeddir, log +from cloudinit import seeddir, log # pylint: disable=W0611 import cloudinit.util as util -import sys -import os.path -import os -import errno class DataSourceNoCloud(DataSource.DataSource): metadata = None diff --git a/cloudinit/DataSourceOVF.py b/cloudinit/DataSourceOVF.py index 76c5dbd8..4f4187fb 100644 --- a/cloudinit/DataSourceOVF.py +++ b/cloudinit/DataSourceOVF.py @@ -23,9 +23,7 @@ import cloudinit.util as util import sys import os.path import os -import errno from xml.dom import minidom -from xml.dom import Node import base64 import re import tempfile diff --git a/cloudinit/UserDataHandler.py b/cloudinit/UserDataHandler.py index 541ee87a..ac2cdda9 100644 --- a/cloudinit/UserDataHandler.py +++ b/cloudinit/UserDataHandler.py @@ -20,12 +20,10 @@ import email from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.base import MIMEBase -from email import encoders import yaml import cloudinit import cloudinit.util as util import hashlib -import os import urllib starts_with_mappings={ |