Revision 2ce40421
b/lib/rpc.py | ||
---|---|---|
30 | 30 |
# if they need to start using instance attributes |
31 | 31 |
# R0904: Too many public methods |
32 | 32 |
|
33 |
import os |
|
34 | 33 |
import logging |
35 | 34 |
import zlib |
36 | 35 |
import base64 |
... | ... | |
520 | 519 |
"""Loads a file and prepares it for an upload to nodes. |
521 | 520 |
|
522 | 521 |
""" |
523 |
# TODO: Use ReadFile(preread=...) and os.fstat
|
|
524 |
data = _Compress(utils.ReadFile(filename)) |
|
525 |
st = os.stat(filename)
|
|
522 |
statcb = utils.FileStatHelper()
|
|
523 |
data = _Compress(utils.ReadFile(filename, preread=statcb))
|
|
524 |
st = statcb.st
|
|
526 | 525 |
|
527 | 526 |
if getents_fn is None: |
528 | 527 |
getents_fn = runtime.GetEnts |
Also available in: Unified diff