wikimedia / pywikibot-core (master)
Build #3841 has errored.
47 minutes and 7 seconds
zhuyifei1999 8a8d7c2 Changeset →
  checkimages.py: Prevent TypeError when self.num_notify is None

When the max notification is not set, self.num_notify will be None
instead of defaultdict, and attempting to reduce the value of an
element will result in:
TypeError: 'NoneType' object has no attribute '__getitem__'
We check if self.num_notify is not None earlier in order to prevent
this exception.

The logic of checking if the counter has ran out has also been changed
from `not value` to `value == 0` for clarity.

Follow up for I9e25b35d42af3c73c581c6d05a6a4a8dc8ef62c6

Bug: T157728
Change-Id: I7d5966c52dff4b342942abe030295f3e3c1f422f

Want to know about upcoming build environment updates?

Would you like to stay up-to-date with the upcoming Travis CI build environment updates? We set up a mailing list for you! Sign up here.

Would you like to test your private code?

Travis CI for Private Projects could be your new best friend!