diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-08-23 09:50:46 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-08-24 11:57:42 -0700 |
| commit | 8758e8a373338e409d7f2863ee91e01060f35628 (patch) | |
| tree | 8006fedcf72ad981c9b98d15c80b0aee376c0a9a /python/ovs/jsonrpc.py | |
| parent | d272c10ecdba8a5dc7adba30c98d8d4273dfd1ae (diff) | |
| download | openvswitch-8758e8a373338e409d7f2863ee91e01060f35628.tar.gz | |
python: Avoid using 'type' as a variable name.
'type' is a Python built-in function, so it's best to avoid using it as
a variable name.
Reported-by: Reid Price <reid@nicira.com>
Diffstat (limited to 'python/ovs/jsonrpc.py')
| -rw-r--r-- | python/ovs/jsonrpc.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/python/ovs/jsonrpc.py b/python/ovs/jsonrpc.py index 2e3c2e066..906e93c68 100644 --- a/python/ovs/jsonrpc.py +++ b/python/ovs/jsonrpc.py @@ -1,4 +1,4 @@ -# Copyright (c) 2010 Nicira Networks +# Copyright (c) 2010, 2011 Nicira Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -36,8 +36,8 @@ class Message(object): T_ERROR: "error"} __next_id = 0 - def __init__(self, type, method, params, result, error, id): - self.type = type + def __init__(self, type_, method, params, result, error, id): + self.type = type_ self.method = method self.params = params self.result = result @@ -70,8 +70,8 @@ class Message(object): return Message(Message.T_ERROR, None, None, None, error, id) @staticmethod - def type_to_string(type): - return Message.__types[type] + def type_to_string(type_): + return Message.__types[type_] @staticmethod def __validate_arg(value, name, must_have): |
