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
=== modified file 'colourterm/mainwindow.py'
--- colourterm/mainwindow.py 2014-05-29 08:50:55 +0000
+++ colourterm/mainwindow.py 2015-03-09 11:31:07 +0000
@@ -4,7 +4,7 @@
4from string import printable4from string import printable
55
6from PyQt4 import QtCore, QtGui, QtWebKit6from PyQt4 import QtCore, QtGui, QtWebKit
7from serial import Serial, SerialException7from serial import Serial, SerialException, serial_for_url
88
9from colourterm import SettingsDialog, ConnectDialog, SComboBox, Highlight, from_utf8, translate, \9from colourterm import SettingsDialog, ConnectDialog, SComboBox, Highlight, from_utf8, translate, \
10 create_default_highlights10 create_default_highlights
@@ -293,8 +293,8 @@
293 except (TypeError, ValueError):293 except (TypeError, ValueError):
294 QtGui.QMessageBox.critical(self, 'Error opening port', 'Error: Port is not valid')294 QtGui.QMessageBox.critical(self, 'Error opening port', 'Error: Port is not valid')
295 return295 return
296 self.device = Serial(296 self.device = serial_for_url(
297 port=port,297 url=port,
298 baudrate=self.connect_dialog.get_baud(),298 baudrate=self.connect_dialog.get_baud(),
299 bytesize=self.connect_dialog.get_data_bits(),299 bytesize=self.connect_dialog.get_data_bits(),
300 parity=self.connect_dialog.get_parity(),300 parity=self.connect_dialog.get_parity(),
@@ -302,7 +302,8 @@
302 timeout=1,302 timeout=1,
303 xonxoff=self.connect_dialog.get_software_handshake(),303 xonxoff=self.connect_dialog.get_software_handshake(),
304 rtscts=self.connect_dialog.get_hardware_handshake(),304 rtscts=self.connect_dialog.get_hardware_handshake(),
305 dsrdtr=None305 dsrdtr=None,
306 do_not_open=False
306 )307 )
307 self.device_closed = False308 self.device_closed = False
308 if not self.device.isOpen():309 if not self.device.isOpen():

Subscribers

People subscribed via source and target branches