def agent_delete_secrets(self, conn_path, setting_name, method):
     service = self.generate_service_name(get_cache().getobject(conn_path).settings_dict["connection"]["uuid"], 
                                          setting_name, method)
     username = getpass.get_user()
     try:
         if keyring.get_password(service, username):
             keyring.set_password(service, username, "")
     except:
         traceback.print_exc()
 def agent_delete_secrets(self, conn_path, setting_name, method):
     service = self.generate_service_name(
         get_cache().getobject(conn_path).settings_dict["connection"]
         ["uuid"], setting_name, method)
     username = getpass.get_user()
     try:
         if keyring.get_password(service, username):
             keyring.set_password(service, username, "")
     except:
         traceback.print_exc()
Esempio n. 3
0
 def generate_ipc_id(self, channel=None):
     if channel:
         return '%s_%s' %(channel,getpass.get_user())
     else:
         return getpass.getuser()