aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--scripts/Face.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/Face.py b/scripts/Face.py
index 58ec47ae8..9814115f0 100644
--- a/scripts/Face.py
+++ b/scripts/Face.py
@@ -5,9 +5,8 @@
# Requires Python 2.7 or later
def sanitiseLine(line):
- if line[-1:] == '\n':
- line = line[:-1]
- if line.find("##") != -1:
+ line = line.rstrip('\n')
+ if "##" in line:
line = line[:line.find("##")]
line = line.strip()
return line