Merge ~harlowja/cloud-init:yaml-check-python into cloud-init:master

Proposed by Joshua Harlow
Status: Merged
Merged at revision: e55ff8f8ea9abeb7c406b2eec3e91aad8fee6f64
Proposed branch: ~harlowja/cloud-init:yaml-check-python
Merge into: cloud-init:master
Diff against target: 24 lines (+1/-2)
2 files modified
Makefile (+0/-1)
tools/validate-yaml.py (+1/-1)
Reviewer Review Type Date Requested Status
Scott Moser Needs Fixing
Review via email: mp+307996@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

Three problem here is that on a system without Python 2 this will just fail.

As there, nothing is named Python. Virtual env does somewhat of a disservice by providing python 3 as python.

I agree that generally this is a pain. We should have some way to tell cloud init which python to use.

Revision history for this message
Scott Moser (smoser) wrote :

reading this again, i see why you changed validate-yaml.py

I think we can go ahead and take this. with maybe a small change too.

http://paste.ubuntu.com/23783652/

that is a larger change that could maybe also fix it, but i'm somewhat afraid of exporting PYTHON and just seeing things use that.

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/Makefile b/Makefile
0old mode 1006440old mode 100644
1new mode 1007551new mode 100755
index 5d35dcc..8f9a520
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,6 @@ endif
30READ_VERSION=$(shell $(PYVER) $(CWD)/tools/read-version)30READ_VERSION=$(shell $(PYVER) $(CWD)/tools/read-version)
31CODE_VERSION=$(shell $(PYVER) -c "from cloudinit import version; print(version.version_string())")31CODE_VERSION=$(shell $(PYVER) -c "from cloudinit import version; print(version.version_string())")
3232
33
34all: check33all: check
3534
36check: check_version pep8 $(pyflakes) test $(yaml)35check: check_version pep8 $(pyflakes) test $(yaml)
diff --git a/tools/validate-yaml.py b/tools/validate-yaml.py
index ed9037d..6e16459 100755
--- a/tools/validate-yaml.py
+++ b/tools/validate-yaml.py
@@ -1,4 +1,4 @@
1#!/usr/bin/env python31#!/usr/bin/env python
22
3"""Try to read a YAML file and report any errors.3"""Try to read a YAML file and report any errors.
4"""4"""

Subscribers

People subscribed via source and target branches