← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~legovini/cloud-init:fix/tox-flake8 into cloud-init:master

 

Paride Legovini has proposed merging ~legovini/cloud-init:fix/tox-flake8 into cloud-init:master.

Commit message:
flake8: use ==/!= to compare str, bytes, and int literals

Requested reviews:
  cloud-init commiters (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~legovini/cloud-init/+git/cloud-init/+merge/362383

Missed this yesterday, as I didn't run tox with '-e tip-pyflakes'.
-- 
Your team cloud-init commiters is requested to review the proposed merge of ~legovini/cloud-init:fix/tox-flake8 into cloud-init:master.
diff --git a/cloudinit/handlers/upstart_job.py b/cloudinit/handlers/upstart_job.py
index 83fb072..003cad6 100644
--- a/cloudinit/handlers/upstart_job.py
+++ b/cloudinit/handlers/upstart_job.py
@@ -89,7 +89,7 @@ def _has_suitable_upstart():
             util.subp(["dpkg", "--compare-versions", dpkg_ver, "ge", good])
             return True
         except util.ProcessExecutionError as e:
-            if e.exit_code is 1:
+            if e.exit_code == 1:
                 pass
             else:
                 util.logexc(LOG, "dpkg --compare-versions failed [%s]",

Follow ups