Use open instead of file for python3

This commit makes to use open() instead of file() for python3. In
python3, built-in file() has been removed[1]. So we should use open()
instead.

[1] https://docs.python.org/3.0/whatsnew/3.0.html#builtins

Change-Id: Idaedf4ad612e31011a14956cfa1033b8257f7330
This commit is contained in:
Masayuki Igawa 2017-06-23 14:21:09 +09:00
parent 2d2fb1509c
commit eaf62f3860
No known key found for this signature in database
GPG Key ID: 290F53EDC899BF89
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ class BackgroundBrowser(webbrowser.GenericBrowser):
def open(self, url, new=0, autoraise=True):
cmdline = [self.name] + [arg.replace("%s", url)
for arg in self.args]
inout = file(os.devnull, "r+")
inout = open(os.devnull, "r+")
try:
if sys.platform[:3] == 'win':
p = subprocess.Popen(cmdline)