initialize self.errors in run()
Initializing it to a (default)dict could cause problems if several instances are used. We don't do that at the moment, but it's bad practice to initialize class members to mutable data types which aren't supposed to be shared between instances. Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
parent
2da92f250a
commit
3f985627a1
1 changed files with 1 additions and 2 deletions
|
@ -501,7 +501,6 @@ class DistgitBugzillaSync:
|
|||
_namespace_to_product = None
|
||||
_product_to_branch_regex = None
|
||||
_branch_regex_to_product = None
|
||||
errors = collections.defaultdict(list)
|
||||
|
||||
def send_email(self, from_address, to_address, subject, message, cc_address=None):
|
||||
'''Send an email if there's an error.
|
||||
|
@ -849,7 +848,7 @@ class DistgitBugzillaSync:
|
|||
self.env["print-no-change"] = self.args.print_no_change
|
||||
|
||||
# Non-fatal errors to alert people about
|
||||
errors = []
|
||||
self.errors = collections.defaultdict(list)
|
||||
|
||||
self.session = retry_session()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue