[pkg-eucalyptus-commits] [SCM] managing cloud instances for Eucalyptus branch, master, updated. 3.0.0-alpha3-257-g1da8e3a
Garrett Holmstrom
gholms at fedoraproject.org
Sun Jun 16 02:31:13 UTC 2013
The following commit has been merged in the master branch:
commit 84d07bd75e47710c5676a866034af5b745257e3d
Merge: 72623190c169b81b0e5057f5ae56e81932d812cb 9faadc3f499574a14d7335e0ac6e6dd05ce7e124
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date: Tue Apr 30 13:57:10 2013 -0700
Merge remote-tracking branch 'mspaulding06/autoscaling_tag_def' into requestbuilder
diff --combined euca2ools/commands/autoscaling/argtypes.py
index a206778,b438ce2..9a34134
--- a/euca2ools/commands/autoscaling/argtypes.py
+++ b/euca2ools/commands/autoscaling/argtypes.py
@@@ -29,18 -29,14 +29,18 @@@
# POSSIBILITY OF SUCH DAMAGE.
+from argparse import ArgumentTypeError
+
+
def autoscaling_tag_def(tag_str):
tag_dict = {}
- pieces = ','.split(tag_str)
+ pieces = tag_str.split(',')
for piece in pieces:
piece = piece.strip()
if '=' not in piece:
- raise ValueError(("invalid tag definition: each segment of '{0}' "
- "must have format KEY=VALUE").format(piece))
+ raise ArgumentTypeError(
+ "invalid tag definition: each segment of '{0}' must have "
+ "format KEY=VALUE".format(piece))
key, val = piece.split('=', 1)
if key == 'k':
tag_dict['Key'] = val
@@@ -54,12 -50,10 +54,12 @@@
if val.lower() in ('true', 'false'):
tag_dict['PropagateAtLaunch'] = val.lower()
else:
- raise ValueError("value for to 'p=' must be 'true' or 'false'")
+ raise ArgumentTypeError(
+ "value for to 'p=' must be 'true' or 'false'")
else:
- raise ValueError("unrecognized tag segment '{0}'".format(piece))
+ raise ArgumentTypeError(
+ "unrecognized tag segment '{0}'".format(piece))
if not tag_dict.get('Key'):
- raise ValueError(
+ raise ArgumentTypeError(
"tag '{0}' must contain a 'k=' segment with a non-empty value")
return tag_dict
--
managing cloud instances for Eucalyptus
More information about the pkg-eucalyptus-commits
mailing list