pep8 and pylint fixups

This commit is contained in:
Scott Moser
2012-11-12 12:23:44 -05:00
parent 37042f6f14
commit be5e996a7f
3 changed files with 5 additions and 8 deletions

View File

@@ -17,10 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import pkg_resources import pkg_resources
from pkg_resources import parse_version from pkg_resources import parse_version as pver
import cloudinit.util as util
import cloudinit.url_helper as uh
import boto.utils as boto_utils import boto.utils as boto_utils
@@ -36,7 +33,7 @@ import boto.utils as boto_utils
BOTO_LAZY = False BOTO_LAZY = False
try: try:
_boto_lib = pkg_resources.get_distribution('boto') _boto_lib = pkg_resources.get_distribution('boto')
if _boto_lib.parsed_version > parse_version("2.5.2"): if _boto_lib.parsed_version > pver("2.5.2"): # pylint: disable=E1103
BOTO_LAZY = True BOTO_LAZY = True
except pkg_resources.DistributionNotFound: except pkg_resources.DistributionNotFound:
pass pass
@@ -47,7 +44,7 @@ def _unlazy_dict(mp):
return mp return mp
if not BOTO_LAZY: if not BOTO_LAZY:
return mp return mp
for (k, v) in mp.items(): for (_k, v) in mp.items():
_unlazy_dict(v) _unlazy_dict(v)
return mp return mp