From 35ca11b2e8c0aeb91674e77d2ce2417798fc241a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20=C5=9Eahin?= Date: Wed, 23 Mar 2016 17:34:12 +0200 Subject: [PATCH] minor bugs were fixed --- opt/ahenk/base/registration/Registration.py | 8 ++++++++ opt/ahenk/plugins/plugin2/main.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/opt/ahenk/base/registration/Registration.py b/opt/ahenk/base/registration/Registration.py index 45dcc68..7dff7f9 100644 --- a/opt/ahenk/base/registration/Registration.py +++ b/opt/ahenk/base/registration/Registration.py @@ -59,6 +59,14 @@ class Registration(): self.logger.debug('[Registration] Registration configuration is updating...') self.db_service.update('registration', ['dn', 'registered'], [dn, 1], ' registered = 0') + if self.conf_manager.has_section('CONNECTION'): + self.conf_manager.set('CONNECTION', 'uid',self.conf_manager.get('REGISTRATION', 'from')) + self.conf_manager.set('CONNECTION', 'password',self.conf_manager.get('REGISTRATION', 'password')) + #TODO get file path? + with open('/etc/ahenk/ahenk.conf', 'w') as configfile: + self.conf_manager.write(configfile) + self.logger.debug('[Registration] Registration configuration file is updated') + def is_registered(self): registered = self.db_service.select_one_result('registration', 'registered', 'registered = 1') if registered == 1: diff --git a/opt/ahenk/plugins/plugin2/main.py b/opt/ahenk/plugins/plugin2/main.py index addbdbb..e036c25 100644 --- a/opt/ahenk/plugins/plugin2/main.py +++ b/opt/ahenk/plugins/plugin2/main.py @@ -3,4 +3,4 @@ # Author: İsmail BAŞARAN def run(val): - print "oo yeah plugin2 " + str(val) + print("oo yeah plugin2 " + str(val))