From 75d97dfc9fe516915822d62fa513cadc9180f457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20=C5=9Eahin?= Date: Mon, 6 Jun 2016 12:20:31 +0300 Subject: [PATCH] minor fixing --- opt/ahenk/base/execution/ExecutionManager.py | 1 + opt/ahenk/base/messaging/Messaging.py | 17 ----------------- opt/ahenk/base/util/util.py | 8 +++----- 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/opt/ahenk/base/execution/ExecutionManager.py b/opt/ahenk/base/execution/ExecutionManager.py index b1011de..13438ae 100644 --- a/opt/ahenk/base/execution/ExecutionManager.py +++ b/opt/ahenk/base/execution/ExecutionManager.py @@ -201,6 +201,7 @@ class ExecutionManager(object): return policy + #from db def get_installed_plugins(self): plugins = self.db_service.select('plugin', ['name', 'version']) p_list = [] diff --git a/opt/ahenk/base/messaging/Messaging.py b/opt/ahenk/base/messaging/Messaging.py index 8b73feb..90c46de 100644 --- a/opt/ahenk/base/messaging/Messaging.py +++ b/opt/ahenk/base/messaging/Messaging.py @@ -28,23 +28,6 @@ class Messaging(object): self.logger.debug('[Messaging]Missing plugin message was created') return str(json_data) - """ - def response_msg(self, response): - print("response message") - data = {} - data['type'] = response.get_type() - data['taskId'] = response.get_id() - data['responseCode'] = response.get_code() - data['responseMessage'] = response.get_message() - data['responseData'] = response.get_data() - data['contentType'] = response.get_content_type() - data['timestamp'] = response.get_timestamp() - - json_data = json.dumps(data) - self.logger.debug('[Messaging] Response message was created') - return str(json_data) - """ - def task_status_msg(self, response): data = {} data['type'] = response.get_type() diff --git a/opt/ahenk/base/util/util.py b/opt/ahenk/base/util/util.py index f57bb9e..fec442c 100644 --- a/opt/ahenk/base/util/util.py +++ b/opt/ahenk/base/util/util.py @@ -2,12 +2,12 @@ # -*- coding: utf-8 -*- # Author: Volkan Şahin -import os +import grp import json +import os +import pwd import shutil import stat -import pwd -import grp import subprocess @@ -183,5 +183,3 @@ class Util: return grp.getgrgid(gid)[0] except: raise - -