projects
/
mw
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fetch: Handle pages that do not exist
[mw]
/
src
/
mw
/
clicommands.py
diff --git
a/src/mw/clicommands.py
b/src/mw/clicommands.py
index 77267035bff5af89ffa7cb57f4c1da1a441cb2e5..b749dd841ecdafe13d4f71aa8f45470a9cd0363b 100644
(file)
--- 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():
}
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'],
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?