Skip to content

Commit

Permalink
core/series.py: fix error 'Series' object has no attribute 'is_pure_p…
Browse files Browse the repository at this point in the history
…ull'

When run ingest_mdir.py on local machine, I got error

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python3.10/threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "/home/Liu/git/nipa/core/tester.py", line 100, in run
    self.test_series(self.tree, s)
  File "/home/Liu/git/nipa/core/tester.py", line 112, in test_series
    self._test_series(tree, series)
  File "/home/Liu/git/nipa/core/tester.py", line 127, in _test_series
    if series.is_pure_pull():
AttributeError: 'Series' object has no attribute 'is_pure_pull'

Fix it by adding function is_pure_pull for Series object.

Signed-off-by: Hangbin Liu <[email protected]>
  • Loading branch information
liuhangbin authored and kuba-moo committed May 25, 2022
1 parent 66d6774 commit 0580a50
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Series(object):
def __init__(self, ident=None, title=""):
self.cover_letter = None
self.cover_pull = None
self.pull_url = None
self.patches = []
self.title = title
self.subject = ""
Expand All @@ -39,3 +40,6 @@ def set_cover_letter(self, data):

def add_patch(self, patch):
self.patches.append(patch)

def is_pure_pull(self):
return bool(self.pull_url)

0 comments on commit 0580a50

Please sign in to comment.