glasserc / rst2wp

Post to Wordpress using ReStructuredText
11 stars 10 forks source link

Fix newPage method under lib/wordpresslib.py #3

Closed jbremnant closed 11 years ago

jbremnant commented 11 years ago

This function references _save_page, which doesn't exist.

def newPage(self, page, publish):
    # FIXME: probably wrong
    id = int(self._save_page('wp', 'newPage', [], page, publish))
    page.id = id
    return id

Changing it to

def newPage(self, page, publish):
    # FIXME: probably wrong
    id = int(self._save_post('wp', 'newPage', [self.blogId], page, publish))
    page.id = id
    return id

will work.

glasserc commented 11 years ago

Commit a proper fix and send a pull request and I'll merge it.

glasserc commented 11 years ago

Fixed by #4.