Skip to content

Commit 306726b

Browse files
committed
remote/exporter: info print ser2net command
This is useful for debugging if ser2net is not starting correctly. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
1 parent 21e1862 commit 306726b

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

labgrid/remote/exporter.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,16 @@ def _start(self, start_params):
230230
_, _, version = str(subprocess.check_output([self.ser2net_bin,'-v'])).split(' ')
231231
major_version = version.split('.')[0]
232232
if int(major_version) >= 4:
233-
self.child = subprocess.Popen([
233+
cmd = [
234234
self.ser2net_bin,
235235
'-d',
236236
'-n',
237237
'-Y', 'connection: &con01# accepter: telnet(rfc2217,mode=server),{}'.format(self.port),
238238
'-Y', ' connector: serialdev(nouucplock=true),{},{}n81,local'.format(start_params['path'], self.local.speed,
239239
),
240-
])
240+
]
241241
else:
242-
self.child = subprocess.Popen([
242+
cmd = [
243243
self.ser2net_bin,
244244
'-d',
245245
'-n',
@@ -248,7 +248,9 @@ def _start(self, start_params):
248248
'{}:telnet:0:{}:{} NONE 8DATABITS 1STOPBIT LOCAL'.format(
249249
self.port, start_params['path'], self.local.speed
250250
),
251-
])
251+
]
252+
self.logger.info("Starting ser2net with: {}".format(" ".join(cmd)))
253+
self.child = subprocess.Popen(cmd)
252254
try:
253255
self.child.wait(timeout=0.5)
254256
raise ExporterError("ser2net for {} exited immediately".format(start_params['path']))

0 commit comments

Comments
 (0)