]> projects.mako.cc - mw/blobdiff - src/mw/clicommands.py
fetch: Handle pages that do not exist
[mw] / src / mw / clicommands.py
index 77267035bff5af89ffa7cb57f4c1da1a441cb2e5..b749dd841ecdafe13d4f71aa8f45470a9cd0363b 100644 (file)
@@ -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'],

Benjamin Mako Hill || Want to submit a patch?