diff options
author | D1plo1d <d1plo1d@d1plo1d.com> | 2013-06-12 08:12:18 +0400 |
---|---|---|
committer | D1plo1d <d1plo1d@d1plo1d.com> | 2013-06-12 08:12:18 +0400 |
commit | 047e83ba4c685c974afe6efb58ced28456da819e (patch) | |
tree | 3986ac8dcd719a7f58bbfc9506f575f0dc2219f7 /pronsole.py | |
parent | 9c55957e64d6471fd495878b28958cc61c2df1c9 (diff) |
Removing bluetooth serial devices from the default connections because bluetooth serial ports persist on OSX and get in the way of connecting to real printers (very few, if any of which are bluetooth).
Diffstat (limited to 'pronsole.py')
-rwxr-xr-x | pronsole.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pronsole.py b/pronsole.py index 9f8989c..f126e04 100755 --- a/pronsole.py +++ b/pronsole.py @@ -461,7 +461,12 @@ class pronsole(cmd.Cmd): except: pass - return baselist+glob.glob('/dev/ttyUSB*') + glob.glob('/dev/ttyACM*') +glob.glob("/dev/tty.*")+glob.glob("/dev/cu.*")+glob.glob("/dev/rfcomm*") + for g in ['/dev/ttyUSB*', '/dev/ttyACM*', "/dev/tty.*", "/dev/cu.*", "/dev/rfcomm*"]: + baselist+=glob.glob(g) + return filter(self._bluetoothSerialFilter, baselist) + + def _bluetoothSerialFilter(self, serial): + return not ("Bluetooth" in serial or "FireFly" in serial) def online(self): self.log("\rPrinter is now online") |