From 0b3d0242fccfd5ebf71f073fe3a8a6699cf0194b Mon Sep 17 00:00:00 2001 From: rembo10 Date: Sat, 15 Jan 2022 21:47:45 +0530 Subject: [PATCH] headphones/__init__.py: file() -> open() --- headphones/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/headphones/__init__.py b/headphones/__init__.py index 2952e0af2..9f1a6b6df 100644 --- a/headphones/__init__.py +++ b/headphones/__init__.py @@ -235,7 +235,7 @@ def daemonize(): except OSError as e: raise RuntimeError("2nd fork failed: %s [%d]", e.strerror, e.errno) - dev_null = file('/dev/null', 'r') + dev_null = open('/dev/null', 'r') os.dup2(dev_null.fileno(), sys.stdin.fileno()) si = open('/dev/null', "r") @@ -251,7 +251,7 @@ def daemonize(): if CREATEPID: logger.info("Writing PID %d to %s", pid, PIDFILE) - with file(PIDFILE, 'w') as fp: + with open(PIDFILE, 'w') as fp: fp.write("%s\n" % pid)