Skip to contentSkip to conversation

systemd-systemctl-native: don't care about line endings

PATCH New Ross Burton 1 participant 1 message Sep 17, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 systemd-systemctl-native: don't care about line endings

It's possible for a service file to accidentally contain mixed line endings, but the string cleanup code was assuming Unix endings.

[ YOCTO #13535 ]

---
 meta/recipes-core/systemd/systemd-systemctl/systemctl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd-systemctl/systemctl +1 -1
index 8837f54e166..ebac863739a 100755
@@ -57,7 +57,7 @@ class SystemdFile():
                 if skip_re.match(line):
                     continue
 
-                line = line.rstrip("\n")
+                line = line.strip()
                 m = section_re.match(line)
                 if m:
                     if m.group('section') not in self.sections:
Signature · 1 line
2.20.1