projects
/
mw
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9167eb3
)
pull must handle deleted pages
author
Joseph Reagle
<joseph.2008@reagle.org>
Tue, 8 Feb 2011 16:12:10 +0000
(11:12 -0500)
committer
Joseph Reagle
<joseph.2008@reagle.org>
Tue, 8 Feb 2011 16:12:10 +0000
(11:12 -0500)
src/mw/clicommands.py
patch
|
blob
|
history
diff --git
a/src/mw/clicommands.py
b/src/mw/clicommands.py
index aec3f24be9edb845fe48a76f89b79d56ed96fb98..433e607839a841b1f219ba5e3d1274cff4af6923 100644
(file)
--- a/
src/mw/clicommands.py
+++ b/
src/mw/clicommands.py
@@
-187,6
+187,11
@@
class PullCommand(CommandBase):
for pageid in response.keys():
pagename = response[pageid]['title']
+ # If no revisions, then error, perhaps page deleted
+ if 'revisions' not in response[pageid]:
+ print 'skipping: "%s" -- cannot find page, perhaps deleted' % (pagename)
+ continue
+
# Is the revisions list a sorted one, should I use [0] or [-1]? -- reagle
if 'comment' in response[pageid]['revisions'][0]:
last_wiki_rev_comment = response[pageid]['revisions'][0]['comment']
Benjamin Mako Hill
||
Want to submit a patch?