You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by mc...@apache.org on 2014/02/26 18:55:51 UTC
git commit: AURORA-200: set_quota should die if given invalid
arguments
Repository: incubator-aurora
Updated Branches:
refs/heads/master 3a9cb3773 -> c4b5887b9
AURORA-200: set_quota should die if given invalid arguments
Bugs closed: AURORA-200
Reviewed at https://reviews.apache.org/r/17877/
Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/c4b5887b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/c4b5887b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/c4b5887b
Branch: refs/heads/master
Commit: c4b5887b928f046ae524efb1213323b1c5912963
Parents: 3a9cb37
Author: Dan Norris <pr...@gmail.com>
Authored: Wed Feb 26 12:31:48 2014 -0500
Committer: Mark Chu-Carroll <mc...@twitter.com>
Committed: Wed Feb 26 12:31:48 2014 -0500
----------------------------------------------------------------------
src/main/python/apache/aurora/client/commands/admin.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/c4b5887b/src/main/python/apache/aurora/client/commands/admin.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/commands/admin.py b/src/main/python/apache/aurora/client/commands/admin.py
index f330831..40588e2 100644
--- a/src/main/python/apache/aurora/client/commands/admin.py
+++ b/src/main/python/apache/aurora/client/commands/admin.py
@@ -192,15 +192,15 @@ def set_quota(cluster, role, cpu_str, ram, disk):
try:
ram_size = parse_data(ram).as_(Data.MB)
disk_size = parse_data(disk).as_(Data.MB)
- except ValueError:
- log.error('Invalid unit specification')
+ except ValueError as e:
+ die(str(e))
try:
cpu = float(cpu_str)
ram_mb = int(ram_size)
disk_mb = int(disk_size)
- except ValueError:
- log.error('Invalid value')
+ except ValueError as e:
+ die(str(e))
options = app.get_options()
resp = AuroraClientAPI(CLUSTERS[cluster], options.verbosity).set_quota(role, cpu, ram_mb, disk_mb)