Browse Source

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
Masayuki Igawa 1 year ago
parent
commit
eaf62f3860
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      gertty/app.py

+ 1
- 1
gertty/app.py View File

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

Loading…
Cancel
Save