summaryrefslogtreecommitdiff
path: root/gbp/rpm/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'gbp/rpm/__init__.py')
-rw-r--r--gbp/rpm/__init__.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/gbp/rpm/__init__.py b/gbp/rpm/__init__.py
index 0affa457..54e9e6a9 100644
--- a/gbp/rpm/__init__.py
+++ b/gbp/rpm/__init__.py
@@ -485,7 +485,7 @@ class SpecFile(object):
indent_re = re.compile(r'^([a-z]+([0-9]+)?\s*:\s*)', flags=re.I)
match = indent_re.match(str(insertafter))
if not match:
- match = indent_re.match(str(insertafter.__next__))
+ match = indent_re.match(str(insertafter.next))
indent = 12 if not match else len(match.group(1))
text = '%-*s%s\n' % (indent, '%s:' % tagname, value)
if key in self._tags:
@@ -579,11 +579,11 @@ class SpecFile(object):
"which to update" % name)
line = self._special_directives[name][0]['line']
gbp.log.debug("Removing content of %s section" % name)
- while line.__next__:
- match = self.directive_re.match(str(line.__next__))
+ while line.next:
+ match = self.directive_re.match(str(line.next))
if match and match.group('name') in self.section_identifiers:
break
- self._content.delete(line.__next__)
+ self._content.delete(line.next)
else:
gbp.log.debug("Adding %s section to the end of spec file" % name)
line = self._content.append('%%%s\n' % name)
@@ -603,8 +603,8 @@ class SpecFile(object):
text = ''
if 'changelog' in self._special_directives:
line = self._special_directives['changelog'][0]['line']
- while line.__next__:
- line = line.__next__
+ while line.next:
+ line = line.next
match = self.directive_re.match(str(line))
if match and match.group('name') in self.section_identifiers:
break
@@ -631,7 +631,7 @@ class SpecFile(object):
if not macro['id'] in ignored:
macro_prev = self._delete_special_macro('patch', macro['id'])
# Remove surrounding if-else
- macro_next = macro_prev.__next__
+ macro_next = macro_prev.next
if (str(macro_prev).startswith('%if') and
str(macro_next).startswith('%endif')):
self._content.delete(macro_next)