K Jonathan Harker cd85714078 Fix nodepool --version
Currently, the `nodepool --version` command prints a usage message
followed by 'nodepool: error: too few arguments' because we are
not specifying a subcommand. The proper way to do this is to use the
version action in argparser rather than store_true with some logic.

Add version_info so it can successfully be imported and a version
action to print the imported string.

Change-Id: Ic5437d508b27fe4a8e02361cfe345c1f741d3c48
2015-02-06 12:09:52 -08:00

18 lines
708 B

# Copyright 2014 Hewlett-Packard Development Company, L.P.
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import pbr.version
version_info = pbr.version.VersionInfo('nodepool')