← Back to team overview

cloud-init-dev team mailing list archive

[Merge] lp:~harlowja/cloud-init/fixer-up into lp:cloud-init

 

Joshua Harlow has proposed merging lp:~harlowja/cloud-init/fixer-up into lp:cloud-init.

Requested reviews:
  cloud init development team (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~harlowja/cloud-init/fixer-up/+merge/233126

Fix logic statement and pep8 line offset
-- 
https://code.launchpad.net/~harlowja/cloud-init/fixer-up/+merge/233126
Your team cloud init development team is requested to review the proposed merge of lp:~harlowja/cloud-init/fixer-up into lp:cloud-init.
=== modified file 'cloudinit/sources/__init__.py'
--- cloudinit/sources/__init__.py	2014-08-26 18:50:11 +0000
+++ cloudinit/sources/__init__.py	2014-09-02 21:18:41 +0000
@@ -66,7 +66,7 @@
             name = name[0:-3]
 
         self.ds_cfg = util.get_cfg_by_path(self.sys_cfg,
-                                          ("datasource", name), {})
+                                           ("datasource", name), {})
         if not ud_proc:
             self.ud_proc = ud.UserDataProcessor(self.paths)
         else:
@@ -166,7 +166,7 @@
         defhost = "localhost"
         domain = defdomain
 
-        if self.metadata or 'local-hostname' not in self.metadata:
+        if not self.metadata or 'local-hostname' not in self.metadata:
             # this is somewhat questionable really.
             # the cloud datasource was asked for a hostname
             # and didn't have one. raising error might be more appropriate


Follow ups