Skip to content

Commit eac21bb

Browse files
committed
Remove newline characters from debug (-d switch) prints under Ubuntu
1 parent 320b4de commit eac21bb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mbed_lstools/lstools_ubuntu.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ def get_dev_by_id(self, subdir):
134134

135135
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
136136
for line in p.stdout.readlines():
137+
line = line.rstrip()
137138
result.append(line)
138139
if self.DEBUG_FLAG:
139140
self.debug(self.get_dev_by_id.__name__, line)
@@ -154,6 +155,7 @@ def get_mounts(self):
154155

155156
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
156157
for line in p.stdout.readlines():
158+
line = line.rstrip()
157159
result.append(line)
158160
if self.DEBUG_FLAG:
159161
self.debug(self.get_mounts.__name__, line)

0 commit comments

Comments
 (0)