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
1diff --git a/Makefile b/Makefile
2old mode 100644
3new mode 100755
4index 5d35dcc..8f9a520
5--- a/Makefile
6+++ b/Makefile
7@@ -30,7 +30,6 @@ endif
8 READ_VERSION=$(shell $(PYVER) $(CWD)/tools/read-version)
9 CODE_VERSION=$(shell $(PYVER) -c "from cloudinit import version; print(version.version_string())")
10
11-
12 all: check
13
14 check: check_version pep8 $(pyflakes) test $(yaml)
15diff --git a/tools/validate-yaml.py b/tools/validate-yaml.py
16index ed9037d..6e16459 100755
17--- a/tools/validate-yaml.py
18+++ b/tools/validate-yaml.py
19@@ -1,4 +1,4 @@
20-#!/usr/bin/env python3
21+#!/usr/bin/env python
22
23 """Try to read a YAML file and report any errors.
24 """

Subscribers

People subscribed via source and target branches