[pygobject/invoke-rewrite] dsextras.py: remove \r as wel as \n character
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject/invoke-rewrite] dsextras.py: remove \r as wel as \n character
- Date: Thu, 28 Apr 2011 23:17:16 +0000 (UTC)
commit 629d267478982c426ba61a639d5c9603fed856e6
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date: Tue Mar 22 11:35:44 2011 +0100
dsextras.py: remove \r as wel as \n character
dsextras.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/dsextras.py b/dsextras.py
index ef848e2..6f8316d 100644
--- a/dsextras.py
+++ b/dsextras.py
@@ -69,7 +69,7 @@ def getstatusoutput(cmd):
text = pipe.read()
sts = pipe.close() or 0
- if text[-1:] == '\n':
+ while text[-1:] in ['\n', '\r']:
text = text[:-1]
return sts, text
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]