-# Copyright (c) 2009, 2010, 2011 Nicira Networks
+# Copyright (c) 2009, 2010, 2011 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# See the License for the specific language governing permissions and
# limitations under the License.
+from __future__ import print_function
+
import argparse
import errno
import os
if error:
rpc.close()
dead_rpcs.append(rpc)
- rpcs = [rpc for rpc in rpcs if not rpc in dead_rpcs]
+ rpcs = [rpc for rpc in rpcs if rpc not in dead_rpcs]
if done and not rpcs:
break
sys.stderr.write("error waiting for reply: %s\n" % os.strerror(error))
sys.exit(1)
- print ovs.json.to_string(msg.to_json())
+ print(ovs.json.to_string(msg.to_json()))
rpc.close()
command_name = args.command[0]
args = args.command_args
- if not command_name in commands:
+ if command_name not in commands:
sys.stderr.write("%s: unknown command \"%s\" "
"(use --help for help)\n" % (argv[0], command_name))
sys.exit(1)