diff options
author | Kali Kaneko <kali@leap.se> | 2015-08-03 14:27:48 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-08-03 14:27:48 -0400 |
commit | a778140a3dfa2907d2e1d45cfa87ee3b2dd5329a (patch) | |
tree | db4b3587b6295730e059279925cbb97fbdb7cb7b /src/leap/mail/utils.py | |
parent | f27ad9a3fdb2a6746ddb13fe4c117614c4b59364 (diff) | |
parent | 5027dd2dd3c7679a7eea025d838a7d472c355623 (diff) |
Merge remote-tracking branch 'leapcode/pr/188' into develop
Diffstat (limited to 'src/leap/mail/utils.py')
-rw-r--r-- | src/leap/mail/utils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/leap/mail/utils.py b/src/leap/mail/utils.py index 029e9f5..64fca98 100644 --- a/src/leap/mail/utils.py +++ b/src/leap/mail/utils.py @@ -254,6 +254,7 @@ def validate_address(address): # String manipulation # + class CustomJsonScanner(object): """ This class is a context manager definition used to monkey patch the default @@ -299,13 +300,13 @@ class CustomJsonScanner(object): end = s.find("\"", idx) while not found: try: - if s[end-1] != "\\": + if s[end - 1] != "\\": found = True else: - end = s.find("\"", end+1) + end = s.find("\"", end + 1) except Exception: found = True - return s[idx:end].decode("string-escape"), end+1 + return s[idx:end].decode("string-escape"), end + 1 def __enter__(self): """ |