diff --git a/src/authm_mad/oneauth b/src/authm_mad/oneauth index 73bcb695ca..f729d356c9 100755 --- a/src/authm_mad/oneauth +++ b/src/authm_mad/oneauth @@ -74,7 +74,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do Sets CPU, MEMORY and NUM_VMs quota for a given user EOT - command 'quota-set', quotaset_desc , :userid, :text, :text, :text do + command 'quota-set', quotaset_desc , :userid, :cpu, :memory, :num_vms do Dir.chdir VAR_LOCATION begin add_quota(*args[1..4]) diff --git a/src/cli/command_parser.rb b/src/cli/command_parser.rb index 03f75fbdb6..cf9516da51 100755 --- a/src/cli/command_parser.rb +++ b/src/cli/command_parser.rb @@ -160,7 +160,7 @@ module CommandParser begin rc = comm[:proc].call rescue Exception =>e - puts e.message + #puts e.message exit -1 end @@ -340,20 +340,14 @@ module CommandParser argument = nil error_msg = nil format.each { |f| - if @formats[f] - rc = @formats[f][:proc].call(arg) - if rc[0]==0 - argument=rc[1] - break - else - error_msg=rc[1] - next - end + format_hash = @formats[f] ? @formats[f] : @formats[:text] + rc = format_hash[:proc].call(arg) + if rc[0]==0 + argument=rc[1] + break else - puts "<#{f}> is not an aceptted format." - puts "Change your command specification or add " << - "a new formatter" - exit -1 + error_msg=rc[1] + next end }