mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-23 23:38:21 +00:00
Use DEFAULT_BUFFER_SIZE for md5sum
This commit is contained in:
parent
c51d71a4fa
commit
7ef9b7600c
@ -20,7 +20,7 @@ import hashlib
|
||||
|
||||
from ..config import Config
|
||||
from . import force_unix_path
|
||||
|
||||
from io import DEFAULT_BUFFER_SIZE
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
@ -173,7 +173,7 @@ def md5sum(path, stopped_event=None):
|
||||
if stopped_event is not None and stopped_event.is_set():
|
||||
log.error("MD5 sum calculation of `{}` has stopped due to cancellation".format(path))
|
||||
return
|
||||
buf = f.read(128)
|
||||
buf = f.read(DEFAULT_BUFFER_SIZE)
|
||||
if not buf:
|
||||
break
|
||||
m.update(buf)
|
||||
|
Loading…
Reference in New Issue
Block a user