Skip to content

Commit 8a48b32

Browse files
committed
Fix lock check bug
Lock checking on an IP (anonymous editor) would crash the script as IPs can't be locked. As such, adjusting approach to account for this by making sure they aren't an anonymous user first.
1 parent 4a31ad5 commit 8a48b32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RemoveBase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def run(self):
6464
continue
6565
summary = "Removing [[Category:" + self.cat_name + "]] as "
6666
try:
67-
if user.is_locked():
67+
if not user.isAnonymous() and user.is_locked():
6868
self.log(page)
6969
self.category_remove(self.target, page)
7070
page.save(

0 commit comments

Comments
 (0)