Merge lp:~adeuring/charmworld/proof-lib-path into lp:~juju-jitsu/charmworld/trunk

Proposed by Abel Deuring
Status: Merged
Approved by: Abel Deuring
Approved revision: 403
Merged at revision: 405
Proposed branch: lp:~adeuring/charmworld/proof-lib-path
Merge into: lp:~juju-jitsu/charmworld/trunk
Diff against target: 28 lines (+5/-2)
2 files modified
charmworld/jobs/config.py (+4/-1)
charmworld/jobs/ingest.py (+1/-1)
To merge this branch: bzr merge lp:~adeuring/charmworld/proof-lib-path
Reviewer Review Type Date Requested Status
Abel Deuring (community) Approve
Benji York (community) Approve
Review via email: mp+188871@code.launchpad.net

Commit message

Try two possible locations for the charm-tools library.

Description of the change

Running ingest with up-to-date packages leads to the error message "No proofer".

The reason is that charmworld.jobs.config specifies the location for the library as '/usr/share/charm-tools/scripts' (correct for older versions od the charm-tools package), while recent version of this package from the juju PPA store the libraries in /usr/lib/python2.7/dist-packages/charmtools .

This branch checks if the new directory exists and if so, uses it.

To post a comment you must log in.
Revision history for this message
Benji York (benji) wrote :

The branch looks good.

I would capitalize the sentence on line 9 of the diff.

review: Approve
403. By Abel Deuring

typo fixed.

Revision history for this message
Abel Deuring (adeuring) :
review: Approve
Revision history for this message
Aaron Bentley (abentley) wrote :

Also at 9, it should be "version", not "verion".

404. By Abel Deuring

antoher typo fixed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charmworld/jobs/config.py'
2--- charmworld/jobs/config.py 2013-07-18 20:25:16 +0000
3+++ charmworld/jobs/config.py 2013-10-07 10:17:39 +0000
4@@ -28,7 +28,10 @@
5 settings.get('mongo.port')))
6 DB_NAME = settings.get('mongo.database')
7
8-CHARM_PROOF_PATH = '/usr/share/charm-tools/scripts'
9+# The charm-tools library location changed in version 1.0.
10+CHARM_PROOF_PATH = '/usr/lib/python2.7/dist-packages/charmtools'
11+if not os.path.isdir(CHARM_PROOF_PATH):
12+ CHARM_PROOF_PATH = '/usr/share/charm-tools/scripts/lib'
13
14 STORE_URL = 'https://store.juju.ubuntu.com'
15
16
17=== modified file 'charmworld/jobs/ingest.py'
18--- charmworld/jobs/ingest.py 2013-09-04 22:56:40 +0000
19+++ charmworld/jobs/ingest.py 2013-10-07 10:17:39 +0000
20@@ -476,7 +476,7 @@
21 if new_path not in sys.path:
22 sys.path.append(new_path)
23 try:
24- import lib.proof as prooflib
25+ import proof as prooflib
26 yield prooflib
27 except ImportError:
28 yield None

Subscribers

People subscribed via source and target branches