Merge branch 'master' of github.com:ianweller/mw
[mw] / src / mw / clicommands.py
index 77267035bff5af89ffa7cb57f4c1da1a441cb2e5..c12663c1e0fcca00d94ea902adf2a0e36fce348f 100644 (file)
@@ -13,8 +13,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program.  If not, see <http://www.gnu.org/licenses/>.
 ###
 
 import getpass
@@ -92,6 +91,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?