Skip to content

Commit

Permalink
headphones/__init__.py: file() -> open()
Browse files Browse the repository at this point in the history
  • Loading branch information
rembo10 committed Jan 15, 2022
1 parent 9551e1b commit 0b3d024
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions headphones/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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)


Expand Down

0 comments on commit 0b3d024

Please sign in to comment.