attached
>From 371e080fb6a86da6f0ec574c8cbc0d8d06c18c99 Mon Sep 17 00:00:00 2001
From: Nathaniel McCallum <npmccal...@redhat.com>
Date: Tue, 30 Jul 2013 11:13:55 -0400
Subject: [PATCH] Return klass in api.register()

This permits the use of api.register as a decorator.
---
 ipalib/plugable.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 25698d8..3eb5943 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -428,6 +428,7 @@ class Registrar(DictProxy):
 
         # The plugin is okay, add to __registered:
         self.__registered.add(klass)
+        return klass
 
 
 class API(DictProxy):
-- 
1.8.3.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to