summaryrefslogtreecommitdiffstats
path: root/python-client/usbmux.py
diff options
context:
space:
mode:
authorGravatar Hector Martin2009-06-12 19:08:43 +0200
committerGravatar marcan2009-06-12 19:08:43 +0200
commit339112a796f774600a55ab143cad0a6123496606 (patch)
treee5f53d71c802bd6b260477b71ae69103241cec1e /python-client/usbmux.py
parent792b5ca2df2cce09e0b6c802c50bc0c0eb4f2298 (diff)
downloadusbmuxd-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.py7
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):
self.socket.sock.close()
class USBMux(object):
- def __init__(self, socketpath="/tmp/usbmuxd"):
+ def __init__(self, socketpath=None):
+ if socketpath is None:
+ if sys.platform == 'darwin':
+ socketpath = "/var/run/usbmuxd"
+ else:
+ socketpath = "/tmp/usbmuxd"
self.socketpath = socketpath
self.listener = MuxConnection(socketpath, BinaryProtocol)
try: