mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-25 11:12:15 +03:00
bug fix
This commit is contained in:
parent
e1da6e4849
commit
aaa354a960
4 changed files with 16 additions and 27 deletions
|
@ -35,7 +35,7 @@ class Messaging(object):
|
|||
data['responseCode'] = response.get_code()
|
||||
data['responseMessage'] = response.get_message()
|
||||
response_data = None
|
||||
if data['responseData'] is not None:
|
||||
if response.get_data() is not None:
|
||||
response_data = json.loads(str(response.get_data()))
|
||||
data['responseData'] = response_data
|
||||
data['contentType'] = response.get_content_type()
|
||||
|
@ -54,7 +54,7 @@ class Messaging(object):
|
|||
data['responseMessage'] = response.get_message()
|
||||
|
||||
response_data = None
|
||||
if data['responseData'] is not None:
|
||||
if response.get_data() is not None:
|
||||
response_data = json.loads(str(response.get_data()))
|
||||
|
||||
data['responseData'] = response_data
|
||||
|
|
12
opt/ahenk/base/model/modes/init_mode.py
Normal file
12
opt/ahenk/base/model/modes/init_mode.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# Author: Volkan Şahin <volkansah.in> <bm.volkansahin@gmail.com>
|
||||
|
||||
|
||||
class InitMode(object):
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@property
|
||||
def obj_name(self):
|
||||
return "INIT_MODE"
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
|
||||
class SafeMode(object):
|
||||
|
||||
def __init__(self, username):
|
||||
self.username = username
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from base.plugin.abstract_plugin import AbstractPlugin
|
||||
|
||||
|
||||
class Sample(AbstractPlugin):
|
||||
def __init__(self, username, context):
|
||||
super(Sample, self).__init__()
|
||||
self.username = username
|
||||
self.context = context
|
||||
self.logger = self.get_logger()
|
||||
|
||||
def handle_safe_mode(self):
|
||||
# TODO Do what do you want to do!
|
||||
pass
|
||||
|
||||
|
||||
def handle_safe_mode(username, context):
|
||||
print('Sample Plugin Safe')
|
||||
sample = Sample(username, context)
|
||||
sample.handle_safe_mode()
|
Loading…
Reference in a new issue