ArielGlenn has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/365564 )
Change subject: fix construction of path for api calls
......................................................................
fix construction of path for api calls
Bug: T170741
Change-Id: Idc58434723284c7af07ef5b65137cf654d2a9450
---
M xmldumps-backup/dumps/apijobs.py
M xmldumps-backup/dumps/utils.py
2 files changed, 2 insertions(+), 2 deletions(-)
Approvals:
ArielGlenn: Looks good to me, approved
jenkins-bot: Verified
diff --git a/xmldumps-backup/dumps/apijobs.py b/xmldumps-backup/dumps/apijobs.py
index 341be04..612e17b 100644
--- a/xmldumps-backup/dumps/apijobs.py
+++ b/xmldumps-backup/dumps/apijobs.py
@@ -48,7 +48,7 @@
# &siprop=namespaces|namespacealiases|magicwords&format=json
base_url = runner.db_server_info.apibase
properties = '|'.join(self._properties)
- api_url =
"{baseurl}/api.php?action=query&meta=siteinfo&siprop={props}&format=json"
+ api_url =
"{baseurl}?action=query&meta=siteinfo&siprop={props}&format=json"
url = api_url.format(baseurl=base_url, props=properties)
command = [["/usr/bin/curl", "-s", url]]
return command
diff --git a/xmldumps-backup/dumps/utils.py b/xmldumps-backup/dumps/utils.py
index 74c79d9..c782931 100644
--- a/xmldumps-backup/dumps/utils.py
+++ b/xmldumps-backup/dumps/utils.py
@@ -152,7 +152,7 @@
if wgcanonserver is None or wgscriptpath is None:
raise BackupError("Failed to get apibase for %s, bailing."
% self.wiki.config.php)
- self.apibase = "/".join([wgcanonserver, wgscriptpath, "api.php"])
+ self.apibase = "/".join([wgcanonserver.rstrip('/'),
wgscriptpath.strip('/'), "api.php"])
def mysql_standard_parameters(self):
host = self.db_server
--
To view, visit https://gerrit.wikimedia.org/r/365564
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idc58434723284c7af07ef5b65137cf654d2a9450
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn <[email protected]>
Gerrit-Reviewer: ArielGlenn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits