From 0b2010dded8869dac45530d423b4208e2c978efc Mon Sep 17 00:00:00 2001 From: Martin Urbanec Date: Fri, 10 Jul 2020 20:24:21 +0000 Subject: [PATCH] new_wikis_handler: dbname never includes dashes, instead, it uses underscores zh-classical.wikipedia.org should map to zh_classicalwiki --- new_wikis_handler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/new_wikis_handler.py b/new_wikis_handler.py index 2552f29..fbab9ac 100644 --- a/new_wikis_handler.py +++ b/new_wikis_handler.py @@ -83,6 +83,7 @@ def hande_task(phid): parts = url.split('.') if len(parts) != 3 or parts[2] != 'org': return + if parts[1] == 'wikimedia': dns = handle_special_wiki_dns(parts) special = True @@ -104,9 +105,9 @@ def hande_task(phid): add_text(' [x] [[{}|DNS]]'.format(dns_url)) if parts[1] == 'wikipedia': - db_name = parts[0] + 'wiki' + db_name = parts[0].replace('-', '_') + 'wiki' else: - db_name = parts[0] + parts[1] + db_name = parts[0].replace('-', '_') + parts[1] handle_subticket_for_cloud(client.lookupPhid('T251371'), task_details, db_name)