mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-24 08:45:13 +00:00
fix python 3.2 str.splitlines() compatibility issue
This commit is contained in:
parent
942120997e
commit
0c166898bf
1 changed files with 1 additions and 1 deletions
|
@ -265,7 +265,7 @@ def fetch_from_cache(args):
|
|||
if not data:
|
||||
raise ConnectionClosed()
|
||||
data = data.decode('utf-8')
|
||||
for line in data.splitlines(keepends=True):
|
||||
for line in data.splitlines(True): # keepends=True for py3.3+
|
||||
if line.startswith('$LOG '):
|
||||
_, level, msg = line.split(' ', 2)
|
||||
level = getattr(logging, level, logging.CRITICAL) # str -> int
|
||||
|
|
Loading…
Reference in a new issue