From bf9af4042a1314a3c9fa03caa05f0db0b3b6375c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20=C5=9Eahin?= Date: Mon, 25 Jul 2016 11:04:21 +0300 Subject: [PATCH] dn is fetchable from system --- opt/ahenk/base/system/system.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/opt/ahenk/base/system/system.py b/opt/ahenk/base/system/system.py index 44ce64d..405d671 100644 --- a/opt/ahenk/base/system/system.py +++ b/opt/ahenk/base/system/system.py @@ -83,6 +83,15 @@ class System: config.read(System.Ahenk.config_path()) return config.get('PLUGIN', 'mainModuleName') + @staticmethod + def dn(): + system = System() + try: + dn = system.db_service.select_one_result('registration', 'dn', " registered='1'") + return dn + except: + return None + @staticmethod def get_pid_number(): pid_number = None @@ -455,3 +464,5 @@ class System: @staticmethod def model(): return cpuinfo.get_cpu_info()['model'] + +