Skip to content

Commit

Permalink
Fix for case that patch does not include number
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Hracek <phracek@redhat.com>
  • Loading branch information
phracek committed Mar 17, 2015
1 parent 5fc1bb9 commit 69173e3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rebasehelper/specfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,10 @@ def _get_patches_flags(self):
for index, line in enumerate(patches):
num, option = self.get_patch_option(line)
num = num.replace(PATCH_PREFIX, '')
patch_flags[int(num)] = index
try:
patch_flags[int(num)] = index
except ValueError:
patch_flags[0] = index
# {num: index of application}
return patch_flags

Expand Down Expand Up @@ -932,7 +935,7 @@ def insert_changelog(self, new_log):
self.set_spec_section(changelog, new_log)

def update_changelog(self, new_log):

"""
Function updates changelog with new version
"""
Expand Down

0 comments on commit 69173e3

Please sign in to comment.