/usr/lib/python2.6/site-packages/openstackclient/common
Edit: /usr/lib/python2.6/site-packages/openstackclient/common/parseractions.pyc (2293B)
Ñò
;vVc @ sH d Z d d k Z d e i f d „ ƒ YZ d e i f d „ ƒ YZ d S( s argparse Custom ActionsiÿÿÿÿNt KeyValueActionc B s e Z d Z d d „ Z RS( s_ A custom action to parse arguments as key=value pairs
Ensures that ``dest`` is a dict
c C s’ t | | i d ƒ d j o t | | i h ƒ n d | j o/ t | | i h ƒ i | i d d ƒ g ƒ n t | | i h ƒ i | d ƒ d S( Nt =i ( t getattrt destt Nonet setattrt updatet splitt pop( t selft parsert namespacet valuest
option_string( ( sT /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/common/parseractions.pyt __call__ s
/N( t __name__t
__module__t __doc__R R ( ( ( sT /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/common/parseractions.pyR s t RangeActionc B s e Z d Z d d „ Z RS( sü A custom action to parse a single value or a range of values
Parses single integer values or a range of integer values delimited
by a colon and returns a tuple of integers:
'4' sets ``dest`` to (4, 4)
'6:9' sets ``dest`` to (6, 9)
c C s, | i d ƒ } t | ƒ d j o t | | i d ƒ nð t | ƒ d j o1 t | | i t | d ƒ t | d ƒ f ƒ n¬ t | ƒ d j o€ t | d ƒ t | d ƒ j o1 t | | i t | d ƒ t | d ƒ f ƒ q(d | d | d f } t i | | ƒ ‚ n d } t i | | ƒ ‚ d S( Nt :i i i s% Invalid range, %s is not less than %ss Invalid range, too many values( i i ( R t lenR R t intt argparset
ArgumentError( R R
R R R
t ranget msg( ( sT /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/common/parseractions.pyR 0 s 1!1N( R R R R R ( ( ( sT /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/common/parseractions.pyR ' s ( R R t ActionR R ( ( ( sT /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/common/parseractions.pyt
s