From: Ian Weller Date: Sat, 19 Dec 2009 05:45:55 +0000 (-0600) Subject: fetch: Handle pages that do not exist X-Git-Url: https://projects.mako.cc/source/mw/commitdiff_plain/dcc38e864010e822beb654f78c91c4c8aa48f48a?hp=--cc fetch: Handle pages that do not exist --- dcc38e864010e822beb654f78c91c4c8aa48f48a 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'],