mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-26 07:53:58 +00:00
Remove explicit flush calls since line_buffering is enabled.
This commit is contained in:
parent
11c08f412a
commit
3193af5482
3 changed files with 2 additions and 4 deletions
|
@ -497,7 +497,6 @@ def report_progress(self, msg, error=False):
|
||||||
if error:
|
if error:
|
||||||
self.error_found = True
|
self.error_found = True
|
||||||
print(msg, file=sys.stderr if error else sys.stdout)
|
print(msg, file=sys.stderr if error else sys.stdout)
|
||||||
sys.stderr.flush()
|
|
||||||
|
|
||||||
def identify_key(self, repository):
|
def identify_key(self, repository):
|
||||||
cdata = repository.get(next(self.chunks.iteritems())[0])
|
cdata = repository.get(next(self.chunks.iteritems())[0])
|
||||||
|
|
|
@ -611,8 +611,8 @@ def run(self, args=None):
|
||||||
def main():
|
def main():
|
||||||
# Make sure stdout and stderr have errors='replace') to avoid unicode
|
# Make sure stdout and stderr have errors='replace') to avoid unicode
|
||||||
# issues when print()-ing unicode file names
|
# issues when print()-ing unicode file names
|
||||||
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, sys.stdout.encoding, 'replace', line_buffering=sys.stdout.line_buffering)
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, sys.stdout.encoding, 'replace', line_buffering=True)
|
||||||
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, sys.stderr.encoding, 'replace', line_buffering=sys.stderr.line_buffering)
|
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, sys.stderr.encoding, 'replace', line_buffering=True)
|
||||||
archiver = Archiver()
|
archiver = Archiver()
|
||||||
try:
|
try:
|
||||||
exit_code = archiver.run(sys.argv[1:])
|
exit_code = archiver.run(sys.argv[1:])
|
||||||
|
|
|
@ -244,7 +244,6 @@ def report_error(msg):
|
||||||
nonlocal error_found
|
nonlocal error_found
|
||||||
error_found = True
|
error_found = True
|
||||||
print(msg, file=sys.stderr)
|
print(msg, file=sys.stderr)
|
||||||
sys.stderr.flush()
|
|
||||||
|
|
||||||
assert not self._active_txn
|
assert not self._active_txn
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue