From 7c6374b4b5d452ab239f8b725038f2a2eb82368f Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 3 Jan 2013 21:00:58 +0100 Subject: split api into more components --- module/api/ApiComponent.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'module/api/ApiComponent.py') diff --git a/module/api/ApiComponent.py b/module/api/ApiComponent.py index 2b09d05a3..ba96b3be9 100644 --- a/module/api/ApiComponent.py +++ b/module/api/ApiComponent.py @@ -1,12 +1,17 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -class ApiComponent: +from module.remote.ttypes import Iface + +# Workaround to let code-completion think, this is subclass of Iface +Iface = object +class ApiComponent(Iface): def __init__(self, core): # Only for auto completion, this class can not be instantiated from pyload import Core assert isinstance(core, Core) + assert issubclass(ApiComponent, Iface) self.core = core # No instantiating! raise Exception() \ No newline at end of file -- cgit v1.2.3