juju-wait 2.5.1 fails from bundletester

Bug #1685389 reported by Kevin W Monroe
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Juju Wait Plugin
New
Undecided
Unassigned

Bug Description

2.5.1 introduced an shutil.which call:

https://git.launchpad.net/juju-wait/commit/?id=df9d0a230cfe618acbd0b40c61b2f4fae1620d06

It seems this doesn't exist in py2. Bundletester is py2 and now fails like this:

...
2017-04-20 19:07:01 DEBUG Deploy of bundle completed.
2017-04-20 19:07:01 INFO Waiting for deployment to complete.
Traceback (most recent call last):
  File "/usr/local/bin/juju-wait", line 11, in <module>
    sys.exit(wait_cmd())
  File "/usr/local/lib/python2.7/dist-packages/juju_wait/__init__.py", line 236, in wait_cmd
    wait(log, args.wait_for_workload, max_wait)
  File "/usr/local/lib/python2.7/dist-packages/juju_wait/__init__.py", line 272, in wait
    status = get_status()
  File "/usr/local/lib/python2.7/dist-packages/juju_wait/__init__.py", line 134, in get_status
    json_status = run_or_die([juju_exe(), 'status', '--format=json'], env=env)
  File "/usr/local/lib/python2.7/dist-packages/juju_wait/__init__.py", line 102, in juju_exe
    if not shutil.which(juju):
AttributeError: 'module' object has no attribute 'which'
...

Would you consider creating a py2/3 compatible way to call 'which'?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.