~bjornt/charms/trusty/swift-storage/forward-port-bug-1350049-fix

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/openstack/utils.py

  • Committer: james.page at ubuntu
  • Date: 2014-07-28 11:54:32 UTC
  • mfrom: (32.1.3 swift-storage)
  • Revision ID: james.page@ubuntu.com-20140728115432-em4ntc388qe058e3
[corey.bryant,r=james-page] Add amulet tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
    '''Derive OpenStack release codename from a given installation source.'''
85
85
    ubuntu_rel = lsb_release()['DISTRIB_CODENAME']
86
86
    rel = ''
 
87
    if src is None:
 
88
        return rel
87
89
    if src in ['distro', 'distro-proposed']:
88
90
        try:
89
91
            rel = UBUNTU_OPENSTACK_RELEASE[ubuntu_rel]
189
191
    for version, cname in vers_map.iteritems():
190
192
        if cname == codename:
191
193
            return version
192
 
    #e = "Could not determine OpenStack version for package: %s" % pkg
 
194
    # e = "Could not determine OpenStack version for package: %s" % pkg
193
195
    # error_out(e)
194
196
 
195
197