diff idavoll/pgsql_storage.py @ 171:bc269696ef42

Reply with the correct error condition on subscription when not subscribed. Author: ralphm. Fixes #7.
author Ralph Meijer <ralphm@ik.nu>
date Thu, 03 Jan 2008 13:10:25 +0000
parents 958e69630e52
children 246911bcb699
line wrap: on
line diff
--- a/idavoll/pgsql_storage.py	Tue Oct 09 10:20:25 2007 +0000
+++ b/idavoll/pgsql_storage.py	Thu Jan 03 13:10:25 2008 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2003-2007 Ralph Meijer
+# Copyright (c) 2003-2008 Ralph Meijer
 # See LICENSE for details.
 
 import copy
@@ -111,6 +111,7 @@
                  subscription)
                 for node, subscriber, resource, subscription in subscriptions]
 
+
 class Node:
 
     implements(iidavoll.INode)
@@ -245,7 +246,7 @@
                         userhost,
                         resource))
         if cursor.rowcount != 1:
-            raise error.SubscriptionNotFound()
+            raise error.NotSubscribed()
 
         return None