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 base64
|
||||
import calendar
|
||||
import errno
|
||||
import gzip
|
||||
import logging
|
||||
import os
|
||||
|
@ -635,13 +636,20 @@ class SvcHub(object):
|
|||
print(msg.encode("utf-8", "replace").decode(), end="")
|
||||
except:
|
||||
print(msg.encode("ascii", "replace").decode(), end="")
|
||||
except OSError as ex:
|
||||
if ex.errno != errno.EPIPE:
|
||||
raise
|
||||
|
||||
if self.logf:
|
||||
self.logf.write(msg)
|
||||
|
||||
def pr(self, *a: Any, **ka: Any) -> None:
|
||||
try:
|
||||
with self.log_mutex:
|
||||
print(*a, **ka)
|
||||
except OSError as ex:
|
||||
if ex.errno != errno.EPIPE:
|
||||
raise
|
||||
|
||||
def check_mp_support(self) -> str:
|
||||
if MACOS:
|
||||
|
|
Loading…
Reference in a new issue