This commit is contained in:
Volkan Şahin 2016-07-13 17:30:27 +03:00
parent e1da6e4849
commit aaa354a960
4 changed files with 16 additions and 27 deletions

View file

@ -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

View 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"

View file

@ -4,8 +4,7 @@
class SafeMode(object):
def __init__(self,username):
def __init__(self, username):
self.username = username
@property

View file

@ -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()