This runtime assertion makes bugs easier to find.
In most other languages, we'd have been able to check this at compile
time. But this is Python. Yay!
Signed-off-by: Karl Hasselström <kha@treskal.com>
exc = RunException
def __init__(self, *cmd):
self.__cmd = list(cmd)
exc = RunException
def __init__(self, *cmd):
self.__cmd = list(cmd)
+ for c in cmd:
+ if type(c) != str:
+ raise Exception, 'Bad command: %r' % cmd
self.__good_retvals = [0]
self.__env = None
self.__indata = None
self.__good_retvals = [0]
self.__env = None
self.__indata = None