jenkins-bot has submitted this change and it was merged.
Change subject: Prevent AttributeError for when filename is None ......................................................................
Prevent AttributeError for when filename is None
From line 172, filename can be None.
Such a case would raise an AttributeError when handling the RuntimeError.
Bug: T121835 Change-Id: I02510d6e69269881dc1ae4b3ed0b9c65156cddbc --- M pwb.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Mpaa: Looks good to me, approved Hazard-SJ: Looks good to me, but someone else must approve jenkins-bot: Verified
diff --git a/pwb.py b/pwb.py index 601c2d4..fe2eeec 100755 --- a/pwb.py +++ b/pwb.py @@ -206,7 +206,7 @@ except RuntimeError as err: # user-config.py to be created print("NOTE: 'user-config.py' was not found!") - if not filename.startswith('generate_'): + if filename is not None and not filename.startswith('generate_'): print("Please follow the prompts to create it:") run_python_file('generate_user_files.py', ['generate_user_files.py'],
pywikibot-commits@lists.wikimedia.org