From 9f1259f5e243f33d88883c447e575e8b2d8fb520 Mon Sep 17 00:00:00 2001 From: Ben Tremblay Date: Fri, 06 Nov 2009 16:22:37 +0000 Subject: publish now returns an id and tests updated --- (limited to 'tutorius/store.py') diff --git a/tutorius/store.py b/tutorius/store.py index d9ea3ea..2e55d71 100644 --- a/tutorius/store.py +++ b/tutorius/store.py @@ -323,12 +323,16 @@ class StoreProxy(object): headers = { 'X-API-Auth' : self.api_auth_key } response = self.conn.request_post(request_url, None, None, None, headers) - if self.helper.iserror(response): return -1 return tutorial_store_id + if self.helper.iserror(response): + return False + + return True + # Otherwise, we want to publish a new tutorial if tutorial_info == None: return False @@ -349,7 +353,11 @@ class StoreProxy(object): id = id_node.getAttribute('value') return id - + + if self.helper.iserror(response): + return False + + return True def unpublish(self, tutorial_store_id): """ -- cgit v0.9.1