Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/791371 )
Change subject: [bugfix] Fix -format option ......................................................................
[bugfix] Fix -format option
Change-Id: I6e5277df9d694cdabc489b91355d2d49a1f765ac --- M scripts/listpages.py 1 file changed, 3 insertions(+), 1 deletion(-)
Approvals: Xqt: Verified; Looks good to me, approved
diff --git a/scripts/listpages.py b/scripts/listpages.py index f206e25..d812ffd 100755 --- a/scripts/listpages.py +++ b/scripts/listpages.py @@ -194,7 +194,9 @@ if option == '-notitle': notitle = True elif option == '-format': - if '\03{{' in value: + if '\03{{' not in value: + fmt = value + else: fmt = value.replace('\03{{', '\03{{') issue_deprecation_warning( 'old color format variant like \03{color}',