summaryrefslogtreecommitdiffstats
path: root/lib/python/debian_support.py
diff options
context:
space:
mode:
authorBrian May <brian@linuxpenguins.xyz>2019-03-04 17:21:45 +1100
committerBrian May <brian@linuxpenguins.xyz>2019-03-04 17:31:32 +1100
commitdbeca9f785cb90139fde37ad0aaad61f70b5506f (patch)
treefaa44ee8494b4adb0d54a3f990cc7f1b2a4c16f0 /lib/python/debian_support.py
parenta0eedec07ab55e1a7ccf3b0892fe991150cef5b1 (diff)
Replace file() with open() for Python 3 compatability
Diffstat (limited to 'lib/python/debian_support.py')
-rw-r--r--lib/python/debian_support.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/python/debian_support.py b/lib/python/debian_support.py
index 8bece17da3..8657be82f2 100644
--- a/lib/python/debian_support.py
+++ b/lib/python/debian_support.py
@@ -131,7 +131,7 @@ class PackageFile:
file with the indicated name.
"""
if fileObj is None:
- fileObj = file(name)
+ fileObj = open(name)
self.name = name
self.file = fileObj
self.lineno = 0
@@ -274,7 +274,7 @@ def replaceFile(lines, local):
import os.path
local_new = local + '.new'
- new_file = file(local_new, 'w+')
+ new_file = open(local_new, 'w+')
try:
for l in lines:
@@ -318,7 +318,7 @@ def updateFile(remote, local, verbose=None):
"""
try:
- local_file = file(local)
+ local_file = open(local)
except IOError:
if verbose:
print("updateFile: no local copy, downloading full file")
@@ -521,7 +521,7 @@ def getconfig():
global _config
if _config is not None:
return _config
- _config = json.load(file(findresource("data", "config.json")))
+ _config = json.load(open(findresource("data", "config.json")))
return _config
_releasecodename = None

© 2014-2024 Faster IT GmbH | imprint | privacy policy