mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
ignore loss of stdout
This commit is contained in:
parent
71bd306268
commit
b4c503657b
|
@ -4,6 +4,7 @@ from __future__ import print_function, unicode_literals
|
||||||
import argparse
|
import argparse
|
||||||
import base64
|
import base64
|
||||||
import calendar
|
import calendar
|
||||||
|
import errno
|
||||||
import gzip
|
import gzip
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
@ -635,13 +636,20 @@ class SvcHub(object):
|
||||||
print(msg.encode("utf-8", "replace").decode(), end="")
|
print(msg.encode("utf-8", "replace").decode(), end="")
|
||||||
except:
|
except:
|
||||||
print(msg.encode("ascii", "replace").decode(), end="")
|
print(msg.encode("ascii", "replace").decode(), end="")
|
||||||
|
except OSError as ex:
|
||||||
|
if ex.errno != errno.EPIPE:
|
||||||
|
raise
|
||||||
|
|
||||||
if self.logf:
|
if self.logf:
|
||||||
self.logf.write(msg)
|
self.logf.write(msg)
|
||||||
|
|
||||||
def pr(self, *a: Any, **ka: Any) -> None:
|
def pr(self, *a: Any, **ka: Any) -> None:
|
||||||
with self.log_mutex:
|
try:
|
||||||
print(*a, **ka)
|
with self.log_mutex:
|
||||||
|
print(*a, **ka)
|
||||||
|
except OSError as ex:
|
||||||
|
if ex.errno != errno.EPIPE:
|
||||||
|
raise
|
||||||
|
|
||||||
def check_mp_support(self) -> str:
|
def check_mp_support(self) -> str:
|
||||||
if MACOS:
|
if MACOS:
|
||||||
|
|
Loading…
Reference in a new issue