~barryprice/juju-deployer/LP1892423

« back to all changes in this revision

Viewing changes to deployer/env/__init__.py

  • Committer: Adam Gandelman
  • Date: 2013-09-03 20:44:14 UTC
  • mfrom: (69.3.45 darwin)
  • Revision ID: adamg@canonical.com-20130903204414-xsqqz2gp83dp5d2o
MergeĀ lp:juju-deployer/darwin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
from .go import GoEnvironment
 
3
from .py import PyEnvironment
 
4
from ..utils import _check_call
 
5
 
 
6
 
 
7
def select_runtime(name, options):
 
8
    # pyjuju does juju --version
 
9
    result = _check_call(["juju", "version"], None, ignoreerr=True)
 
10
    if result is None:
 
11
        return PyEnvironment(name, options)
 
12
    return GoEnvironment(name, options)
 
13