OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 from __future__ import absolute_import | 4 from __future__ import absolute_import |
5 import os | 5 import os |
6 import sys | 6 import sys |
7 | 7 |
8 def __init__(): | 8 def __init__(): |
9 ws_path = os.path.join(os.path.dirname(__file__), | 9 ws_path = os.path.join(os.path.dirname(__file__), |
10 '../third_party/websocket-client') | 10 '../../../third_party/websocket-client') |
11 ws_path = os.path.abspath(ws_path) | 11 ws_path = os.path.abspath(ws_path) |
12 assert os.path.exists(os.path.join(ws_path, 'websocket.py')) | 12 assert os.path.exists(os.path.join(ws_path, 'websocket.py')) |
13 if ws_path not in sys.path: | 13 if ws_path not in sys.path: |
14 sys.path.append(ws_path) | 14 sys.path.append(ws_path) |
15 | 15 |
16 __init__() | 16 __init__() |
17 | 17 |
18 from websocket import create_connection # pylint: disable=W0611 | 18 from websocket import create_connection # pylint: disable=W0611 |
19 from websocket import WebSocketException # pylint: disable=W0611 | 19 from websocket import WebSocketException # pylint: disable=W0611 |
OLD | NEW |