Revision debac808 scripts/gnt-node

b/scripts/gnt-node
114 114
  try:
115 115
    return _USER_STORAGE_TYPE[user_storage_type]
116 116
  except KeyError:
117
    raise errors.OpPrereqError("Unknown storage type: %s" % user_storage_type)
117
    raise errors.OpPrereqError("Unknown storage type: %s" % user_storage_type,
118
                               errors.ECODE_INVAL)
118 119

  
119 120

  
120 121
@UsesRPC
......
249 250
  cnt = [dst_node, iallocator].count(None)
250 251
  if cnt != 1:
251 252
    raise errors.OpPrereqError("One and only one of the -n and -I"
252
                               " options must be passed")
253
                               " options must be passed", errors.ECODE_INVAL)
253 254

  
254 255
  selected_fields = ["name", "sinst_list"]
255 256
  src_node = args[0]
......
270 271
    if src_node == dst_node:
271 272
      raise errors.OpPrereqError("Evacuate node needs different source and"
272 273
                                 " target nodes (node %s given twice)" %
273
                                 src_node)
274
                                 src_node, errors.ECODE_INVAL)
274 275
    txt_msg = "to node %s" % dst_node
275 276
  else:
276 277
    txt_msg = "using iallocator %s" % iallocator

Also available in: Unified diff