summaryrefslogtreecommitdiffstats
path: root/ipsilon/providers/common.py
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-09-10 17:20:02 -0400
committerPatrick Uiterwijk <puiterwijk@redhat.com>2014-09-24 20:51:47 +0200
commitb4bcb99e3217e658c1277cd5d484fa0c62c7aa0c (patch)
tree43ac5b08ed35f207eba1bc34dba89162d847a95f /ipsilon/providers/common.py
parente0895efb26de64a28de7b9219f524b715c396b2b (diff)
downloadipsilon-b4bcb99e3217e658c1277cd5d484fa0c62c7aa0c.tar.gz
ipsilon-b4bcb99e3217e658c1277cd5d484fa0c62c7aa0c.tar.xz
ipsilon-b4bcb99e3217e658c1277cd5d484fa0c62c7aa0c.zip
Use transactions throughout the code
Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Diffstat (limited to 'ipsilon/providers/common.py')
-rwxr-xr-xipsilon/providers/common.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ipsilon/providers/common.py b/ipsilon/providers/common.py
index 6bcfef8..b1968f4 100755
--- a/ipsilon/providers/common.py
+++ b/ipsilon/providers/common.py
@@ -118,7 +118,13 @@ class ProviderPageBase(Page):
raise cherrypy.HTTPError(501)
def root(self, *args, **kwargs):
- op = getattr(self, cherrypy.request.method, self.GET)
+ method = cherrypy.request.method
+
+ preop = getattr(self, 'pre_%s' % method, None)
+ if preop and callable(preop):
+ preop(*args, **kwargs)
+
+ op = getattr(self, method, self.GET)
if callable(op):
return op(*args, **kwargs)
else: