|
@@ -2,10 +2,6 @@ |
|
|
channel factory |
|
|
channel factory |
|
|
""" |
|
|
""" |
|
|
|
|
|
|
|
|
from channel.wechat.wechat_channel import WechatChannel |
|
|
|
|
|
from channel.wechat.wechaty_channel import WechatyChannel |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def create_channel(channel_type): |
|
|
def create_channel(channel_type): |
|
|
""" |
|
|
""" |
|
|
create a channel instance |
|
|
create a channel instance |
|
@@ -13,7 +9,9 @@ def create_channel(channel_type): |
|
|
:return: channel instance |
|
|
:return: channel instance |
|
|
""" |
|
|
""" |
|
|
if channel_type == 'wx': |
|
|
if channel_type == 'wx': |
|
|
|
|
|
from channel.wechat.wechat_channel import WechatChannel |
|
|
return WechatChannel() |
|
|
return WechatChannel() |
|
|
elif channel_type == 'wxy': |
|
|
elif channel_type == 'wxy': |
|
|
|
|
|
from channel.wechat.wechaty_channel import WechatyChannel |
|
|
return WechatyChannel() |
|
|
return WechatyChannel() |
|
|
raise RuntimeError |
|
|
raise RuntimeError |