Skip to content

Commit

Permalink
Fix a pylint error in the amazon mixin
Browse files Browse the repository at this point in the history
************* Module rcAmazon
lib/rcAmazon.py:29:8: E0401: Unable to import 'httplib' (import-error)
  • Loading branch information
cvaroqui committed Oct 2, 2018
1 parent cddc641 commit 53b0d1c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/rcAmazon.py
Expand Up @@ -26,7 +26,10 @@ def aws(self, cmd, verbose=True):
def get_instance_id(self):
if self.instance_id is not None:
return self.instance_id
import httplib
try:
import httplib
except ImportError:
raise ex.excError("the httplib module is required")
c = httplib.HTTPConnection("instance-data")
c.request("GET", "/latest/meta-data/instance-id")
self.instance_id = c.getresponse().read()
Expand Down

0 comments on commit 53b0d1c

Please sign in to comment.