Merge lp:~w-juliankent/colourterm/serialurl into lp:colourterm

Proposed by Julian Kent
Status: Merged
Merged at revision: 13
Proposed branch: lp:~w-juliankent/colourterm/serialurl
Merge into: lp:colourterm
Diff against target: 33 lines (+5/-4)
1 file modified
colourterm/mainwindow.py (+5/-4)
To merge this branch: bzr merge lp:~w-juliankent/colourterm/serialurl
Reviewer Review Type Date Requested Status
Raoul Snyman Approve
Review via email: mp+252263@code.launchpad.net

Description of the change

Allow urls to be passed to PySerial for RFC2217/hwgrep support

To post a comment you must log in.
Revision history for this message
Raoul Snyman (raoul-snyman) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'colourterm/mainwindow.py'
2--- colourterm/mainwindow.py 2014-05-29 08:50:55 +0000
3+++ colourterm/mainwindow.py 2015-03-09 11:31:07 +0000
4@@ -4,7 +4,7 @@
5 from string import printable
6
7 from PyQt4 import QtCore, QtGui, QtWebKit
8-from serial import Serial, SerialException
9+from serial import Serial, SerialException, serial_for_url
10
11 from colourterm import SettingsDialog, ConnectDialog, SComboBox, Highlight, from_utf8, translate, \
12 create_default_highlights
13@@ -293,8 +293,8 @@
14 except (TypeError, ValueError):
15 QtGui.QMessageBox.critical(self, 'Error opening port', 'Error: Port is not valid')
16 return
17- self.device = Serial(
18- port=port,
19+ self.device = serial_for_url(
20+ url=port,
21 baudrate=self.connect_dialog.get_baud(),
22 bytesize=self.connect_dialog.get_data_bits(),
23 parity=self.connect_dialog.get_parity(),
24@@ -302,7 +302,8 @@
25 timeout=1,
26 xonxoff=self.connect_dialog.get_software_handshake(),
27 rtscts=self.connect_dialog.get_hardware_handshake(),
28- dsrdtr=None
29+ dsrdtr=None,
30+ do_not_open=False
31 )
32 self.device_closed = False
33 if not self.device.isOpen():

Subscribers

People subscribed via source and target branches