-#!/usr/bin/python
+#
#
# Copyright (C) 2006, 2007 Google Inc.
retval = kind, kind
elif kind == constants.TAG_NODE or kind == constants.TAG_INSTANCE:
if not args:
- raise errors.OpPrereq("no arguments passed to the command")
+ raise errors.OpPrereqError("no arguments passed to the command")
name = args.pop(0)
retval = kind, name
else:
new_text.append(textwrap.fill(line, 70, replace_whitespace=False))
text = "\n".join(new_text)
try:
- f = file("/dev/tty", "r+")
+ f = file("/dev/tty", "a+")
except IOError:
return answer
try:
format_fields = []
for field in fields:
+ if headers and field not in headers:
+ raise errors.ProgrammerError("Missing header description for field '%s'"
+ % field)
if separator is not None:
format_fields.append("%s")
elif field in numfields:
pass
else:
val = row[idx] = utils.FormatUnit(val)
+ val = row[idx] = str(val)
if separator is None:
mlens[idx] = max(mlens[idx], len(val))