mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Use DEFAULT_BUFFER_SIZE for md5sum
This commit is contained in:
1 parent
c51d71a4fa
commit
7ef9b7600c
1 file changed
+2
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user