Files
git-upstream/ghp/subcommand.py
Darragh Bailey c9523f7a83 Insert correct copyright and licenses
Update copyright and licenses to note that code is HP proprietary and
has not been approved by the OSRB. Add comments noting where code has
been included from other projects and include the appropriate license
terms in the file header.

Change-Id: I2ce8c2d48e6f73d18d95fa073e5f962805121d1a
2013-07-24 07:45:27 +01:00

27 lines
1017 B
Python

#
# Copyright (c) 2012 OpenStack LLC.
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# 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.
# following function taken from python-keystoneclient - keystoneclient/utils.py
# Decorator for cli-args
def arg(*args, **kwargs):
def _decorator(func):
# Because of the sematics of decorator composition if we just append
# to the options list positional options will appear to be backwards.
func.__dict__.setdefault('arguments', []).insert(0, (args, kwargs))
return func
return _decorator