minor bugs were fixed

This commit is contained in:
Volkan Şahin 2016-03-23 17:34:12 +02:00
parent 65f4b757ea
commit 35ca11b2e8
2 changed files with 9 additions and 1 deletions

View file

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

View file

@ -3,4 +3,4 @@
# Author: İsmail BAŞARAN <ismail.basaran@tubitak.gov.tr> <basaran.ismaill@gmail.com>
def run(val):
print "oo yeah plugin2 " + str(val)
print("oo yeah plugin2 " + str(val))