if kws.get('err'):
return stdout, stderr
if p.returncode:
- print >> sys.stderr, 'Error', p.returncode, 'on remctl', args, ':'
- print >> sys.stderr, stderr
+ print('Error', p.returncode, 'on remctl', args, ':', file=sys.stderr)
+ print(stderr, file=sys.stderr)
raise CodeError('ERROR on remctl')
return stdout
% '.'.join(components))
if type(conf) == list:
for i in xrange(len(conf)):
- print i
+ print(i)
else:
for k in conf.iterkeys():
- print k
+ print(k)
else:
if type(conf) not in (dict, list):
- print conf
+ print(conf)
else:
yaml.dump(conf, stdout,
Dumper=yaml.CSafeDumper, default_flow_style=False)
- print >> stderr, ex
except invirt_exception as ex:
+ print(ex, file=stderr)
return 1
if __name__ == '__main__':