aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/deb
diff options
context:
space:
mode:
Diffstat (limited to 'gbp/deb')
-rw-r--r--gbp/deb/changelog.py2
-rw-r--r--gbp/deb/control.py2
-rw-r--r--gbp/deb/dscfile.py2
-rw-r--r--gbp/deb/format.py4
-rw-r--r--gbp/deb/source.py2
5 files changed, 6 insertions, 6 deletions
diff --git a/gbp/deb/changelog.py b/gbp/deb/changelog.py
index 2857431f..356f74d7 100644
--- a/gbp/deb/changelog.py
+++ b/gbp/deb/changelog.py
@@ -115,7 +115,7 @@ class ChangeLog(object):
self._cp = cp
def _read(self):
- with file(self.filename) as f:
+ with open(self.filename) as f:
self._contents = f.read()
def __getitem__(self, item):
diff --git a/gbp/deb/control.py b/gbp/deb/control.py
index b15d3601..a4cef2fa 100644
--- a/gbp/deb/control.py
+++ b/gbp/deb/control.py
@@ -47,7 +47,7 @@ class Control(object):
if not os.access(filename, os.F_OK):
raise NoControlError("Control file %s does not exist" % filename)
- with file(filename) as f:
+ with open(filename) as f:
control = email.message_from_file(f)
if not control.items():
diff --git a/gbp/deb/dscfile.py b/gbp/deb/dscfile.py
index abaf6901..e2492dcc 100644
--- a/gbp/deb/dscfile.py
+++ b/gbp/deb/dscfile.py
@@ -49,7 +49,7 @@ class DscFile(object):
self.native = False
self.dscfile = os.path.abspath(dscfile)
- f = file(self.dscfile)
+ f = open(self.dscfile)
fromdir = os.path.dirname(os.path.abspath(dscfile))
for line in f:
m = self.version_re.match(line)
diff --git a/gbp/deb/format.py b/gbp/deb/format.py
index 9abba739..3a4c8ab3 100644
--- a/gbp/deb/format.py
+++ b/gbp/deb/format.py
@@ -92,7 +92,7 @@ class DebianSourceFormat(object):
'quilt'
>>> os.unlink(t.name)
"""
- with file(filename) as f:
+ with open(filename) as f:
return klass(f.read())
@classmethod
@@ -107,7 +107,7 @@ class DebianSourceFormat(object):
the above parameters
"""
format_file = format_file or klass.format_file
- with file(klass.format_file, 'w') as f:
+ with open(klass.format_file, 'w') as f:
f.write("%s (%s)" % (version, type))
return klass.parse_file(klass.format_file)
diff --git a/gbp/deb/source.py b/gbp/deb/source.py
index 1e873129..c7403613 100644
--- a/gbp/deb/source.py
+++ b/gbp/deb/source.py
@@ -32,7 +32,7 @@ class FileVfs(object):
def open(self, path, flags=None):
flags = flags or 'r'
- return file(os.path.join(self._dir, path), flags)
+ return open(os.path.join(self._dir, path), flags)
class DebianSourceError(Exception):
pass