From dcc38e864010e822beb654f78c91c4c8aa48f48a Mon Sep 17 00:00:00 2001 From: Ian Weller Date: Fri, 18 Dec 2009 23:45:55 -0600 Subject: [PATCH 1/1] fetch: Handle pages that do not exist --- src/mw/clicommands.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mw/clicommands.py b/src/mw/clicommands.py index 7726703..b749dd8 100644 --- a/src/mw/clicommands.py +++ b/src/mw/clicommands.py @@ -92,6 +92,10 @@ class FetchCommand(CommandBase): } response = self.api.call(data)['query']['pages'] for pageid in response.keys(): + if 'missing' in response[pageid].keys(): + print '%s: %s: page does not exist, file not created' % \ + (self.me, response[pageid]['title']) + continue revid = [x['revid'] for x in response[pageid]['revisions']] self.metadir.add_page_info(int(pageid), response[pageid]['title'], -- 2.39.5