fix make pep8

This commit is contained in:
Scott Moser 2012-09-24 16:54:51 -04:00
parent cc47e6d005
commit 86d2bf919d
3 changed files with 3 additions and 2 deletions

View File

@ -28,5 +28,5 @@ LOG = logging.getLogger(__name__)
class Distro(rhel.Distro):
distro_name = 'fedora'
distro_name = 'fedora'
default_user = 'ec2-user'

View File

@ -39,6 +39,7 @@ def _patch_logging():
# sys.stderr using a fallback logger
fallback_handler = QuietStreamHandler(sys.stderr)
fallback_handler.setFormatter(logging.Formatter(FALL_FORMAT))
def handleError(self, record):
try:
fallback_handler.handle(record)

View File

@ -173,7 +173,7 @@ class DataSource(object):
# make up a hostname (LP: #475354) in format ip-xx.xx.xx.xx
lhost = self.metadata['local-hostname']
if util.is_ipv4(lhost):
toks = [ "ip-%s" % lhost.replace(".", "-") ]
toks = ["ip-%s" % lhost.replace(".", "-")]
else:
toks = lhost.split(".")