From ac1a25cb0d4197ecc100c4af96389d33693702b0 Mon Sep 17 00:00:00 2001 From: edip Date: Fri, 16 Nov 2018 10:36:07 +0300 Subject: [PATCH] unregister bugfix --- src/base/messaging/messaging.py | 2 +- src/base/registration/registration.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/base/messaging/messaging.py b/src/base/messaging/messaging.py index 00f7cfd..50f3f87 100644 --- a/src/base/messaging/messaging.py +++ b/src/base/messaging/messaging.py @@ -152,7 +152,7 @@ class Messaging(object): def unregister_msg(self): - user_name = os.getlogin() + user_name = self.db_service.select_one_result('session', 'username') self.logger.debug('User : ' + str(user_name)) diff --git a/src/base/registration/registration.py b/src/base/registration/registration.py index ae0ecfe..d2e5122 100644 --- a/src/base/registration/registration.py +++ b/src/base/registration/registration.py @@ -357,6 +357,8 @@ class Registration: self.unregister() self.logger.info('Purge ldap packages') Util.execute("sudo apt purge libpam-ldap libnss-ldap ldap-utils -y") + #self.logger.info('Purge ahenk packages') + #Util.execute("sudo apt purge ahenk ahenk-* -y") Util.execute("sudo apt autoremove -y") self.change_configs_after_purge() self.logger.info('purging successfull')