Skip to content

Commit a033fc7

Browse files
committed
This usage of the Python3.8 Walrus operator breaks on Python3.7
1 parent 68482bd commit a033fc7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/tarfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,8 @@ def _proc_pax(self, tarfile):
13851385
encoding = None
13861386
raw_headers = []
13871387
while len(buf) > pos and buf[pos] != 0x00:
1388-
if not (match := _header_length_prefix_re.match(buf, pos)):
1388+
match = _header_length_prefix_re.match(buf, pos)
1389+
if not match:
13891390
raise InvalidHeaderError("invalid header")
13901391
try:
13911392
length = int(match.group(1))

0 commit comments

Comments
 (0)