Update pack.py - SonarQube issues · gitpython-developers/gitdb@8350bd5

Original file line numberDiff line numberDiff line change

@@ -267,8 +267,6 @@ def close(self):

267267

def _set_cache_(self, attr):

268268

if attr == "_packfile_checksum":

269269

self._packfile_checksum = self._cursor.map()[-40:-20]

270-

elif attr == "_packfile_checksum":

271-

self._packfile_checksum = self._cursor.map()[-20:]

272270

elif attr == "_cursor":

273271

# Note: We don't lock the file when reading as we cannot be sure

274272

# that we can actually write to the location - it could be a read-only

@@ -848,7 +846,6 @@ def is_valid_stream(self, sha, use_crc=False):

848846

assert shawriter.sha(as_hex=False) == sha

849847

return shawriter.sha(as_hex=False) == sha

850848

# END handle crc/sha verification

851-

return True

852849
853850

def info_iter(self):

854851

"""