Skip to content

Commit

Permalink
Remove the use of 'file'
Browse files Browse the repository at this point in the history
Signed-off-by: Qin Zhang (张琴) <qin.zhang@citrix.com>
  • Loading branch information
qinz0822 committed Nov 2, 2023
1 parent e5df238 commit 45049ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion XSConsoleData.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ def IsXAPIRunning(self):
pidfile = "/var/run/xapi.pid"
if pidfile:
# Look for any "xapi" running
pid = file(pidfile).read().strip()
pid = open(pidfile, "r").read().strip()
exelink = "/proc/%s/exe" % (pid)
if os.path.exists(exelink):
if os.path.basename(os.readlink(exelink)) == "xapi":
Expand Down

0 comments on commit 45049ea

Please sign in to comment.