Update obsolete file() calls in bitmessagemain

This commit is contained in:
Dmitri Bogomolov 2021-08-19 11:49:40 +03:00
parent 242056c1fb
commit d872a23ae3
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -424,9 +424,9 @@ class Main(object):
sys.stdout.flush()
sys.stderr.flush()
if not sys.platform.startswith('win'):
si = file(os.devnull, 'r')
so = file(os.devnull, 'a+')
se = file(os.devnull, 'a+', 0)
si = open(os.devnull, 'r')
so = open(os.devnull, 'a+')
se = open(os.devnull, 'a+', 0)
os.dup2(si.fileno(), sys.stdin.fileno())
os.dup2(so.fileno(), sys.stdout.fileno())
os.dup2(se.fileno(), sys.stderr.fileno())