replace 'print()' with 'output.stderr_write("\n")'

This commit is contained in:
Mike Fährmann
2025-02-15 18:01:05 +01:00
parent 35307608f2
commit 800cf5beb5
4 changed files with 15 additions and 15 deletions

View File

@@ -12,7 +12,7 @@ import sys
from .extractor.common import Extractor, Message
from .job import DownloadJob
from . import util, version, exception
from . import util, version, output, exception
REPOS = {
"stable" : "mikf/gallery-dl",
@@ -143,13 +143,13 @@ class UpdateJob(DownloadJob):
def _warning(self, msg, *args):
if self._newline:
self._newline = False
print()
output.stderr_write("\n")
self.extractor.log.warning(msg, *args)
def _error(self, msg, *args):
if self._newline:
self._newline = False
print()
output.stderr_write("\n")
self.status |= 1
self.extractor.log.error(msg, *args)