diff options
| author | 2009-06-12 19:08:43 +0200 | |
|---|---|---|
| committer | 2009-06-12 19:08:43 +0200 | |
| commit | 339112a796f774600a55ab143cad0a6123496606 (patch) | |
| tree | e5f53d71c802bd6b260477b71ae69103241cec1e /python-client/usbmux.py | |
| parent | 792b5ca2df2cce09e0b6c802c50bc0c0eb4f2298 (diff) | |
| download | usbmuxd-339112a796f774600a55ab143cad0a6123496606.tar.gz usbmuxd-339112a796f774600a55ab143cad0a6123496606.tar.bz2 | |
Make usbmux.py default to the proper paths on OSX and Linux
Diffstat (limited to 'python-client/usbmux.py')
| -rw-r--r-- | python-client/usbmux.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/python-client/usbmux.py b/python-client/usbmux.py index 172f326..8b0270d 100644 --- a/python-client/usbmux.py +++ b/python-client/usbmux.py | |||
| @@ -209,7 +209,12 @@ class MuxConnection(object): | |||
| 209 | self.socket.sock.close() | 209 | self.socket.sock.close() |
| 210 | 210 | ||
| 211 | class USBMux(object): | 211 | class USBMux(object): |
| 212 | def __init__(self, socketpath="/tmp/usbmuxd"): | 212 | def __init__(self, socketpath=None): |
| 213 | if socketpath is None: | ||
| 214 | if sys.platform == 'darwin': | ||
| 215 | socketpath = "/var/run/usbmuxd" | ||
| 216 | else: | ||
| 217 | socketpath = "/tmp/usbmuxd" | ||
| 213 | self.socketpath = socketpath | 218 | self.socketpath = socketpath |
| 214 | self.listener = MuxConnection(socketpath, BinaryProtocol) | 219 | self.listener = MuxConnection(socketpath, BinaryProtocol) |
| 215 | try: | 220 | try: |
