From 79e2c5951fea9b901aa27761113f7c691a5c3c65 Mon Sep 17 00:00:00 2001 From: Federico Leva Date: Sun, 8 Mar 2015 20:52:24 +0100 Subject: [PATCH] Fix API check if only index is passed I forgot that the preceding point only extracts the api.php URL if the "wiki" argument is passed to say it's a MediaWiki wiki (!). --- dumpgenerator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dumpgenerator.py b/dumpgenerator.py index 0ff9d39..8217bbd 100644 --- a/dumpgenerator.py +++ b/dumpgenerator.py @@ -1267,12 +1267,12 @@ def getParameters(params=[]): if api: check = checkAPI(api=api, session=session) - if check[0]: + if api and check: index2 = check[1] api = check[2] print 'API is OK: ' + api else: - print 'Error in API, please, provide a correct path to API' + print 'Error in API. Please, provide a correct path to API' sys.exit(1) if index and checkIndex(