diff options
Diffstat (limited to 'libmproxy/utils.py')
-rw-r--r-- | libmproxy/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmproxy/utils.py b/libmproxy/utils.py index 871beb35..69a06a26 100644 --- a/libmproxy/utils.py +++ b/libmproxy/utils.py @@ -253,7 +253,7 @@ def clean_hanging_newline(t): problem at the risk of removing a hanging newline in the rare cases where the user actually intends it. """ - if t[-1] == "\n": + if t and t[-1] == "\n": return t[:-1] return t |