当前位置: 首页>>代码示例>>Python>>正文


Python Secret.password_lookup_finish方法代码示例

本文整理汇总了Python中gi.repository.Secret.password_lookup_finish方法的典型用法代码示例。如果您正苦于以下问题:Python Secret.password_lookup_finish方法的具体用法?Python Secret.password_lookup_finish怎么用?Python Secret.password_lookup_finish使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gi.repository.Secret的用法示例。


在下文中一共展示了Secret.password_lookup_finish方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: on_password_lookup_finish

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_lookup_finish [as 别名]
 def on_password_lookup_finish(source, result, data):
     try:
         password = Secret.password_lookup_finish(result) or ''
     except GLib.Error as e:
         password = ''
         logging.error('Failed to lookup password, Error: {}'.format(e))
     callback(password)
开发者ID:JasonLG1979,项目名称:pithos,代码行数:9,代码来源:util.py

示例2: _on_password_lookup

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_lookup_finish [as 别名]
 def _on_password_lookup(self, source, result):
     """
         Set password entry
         @param source as GObject.Object
         @param result Gio.AsyncResult
     """
     password = None
     if result is not None:
         password = Secret.password_lookup_finish(result)
     if password is not None:
         self._password.set_text(password)
开发者ID:serkanalgur,项目名称:lollypop,代码行数:13,代码来源:settings.py

示例3: _on_password_lookup

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_lookup_finish [as 别名]
 def _on_password_lookup(self, source, result):
     """
         Init self object
         @param source as GObject.Object
         @param result Gio.AsyncResult
     """
     try:
         password = Secret.password_lookup_finish(result)
         self._password = password
         if Gio.NetworkMonitor.get_default().get_network_available():
             start_new_thread(self._connect, (self._username, password))
     except Exception as e:
         print("Lastfm::_on_password_lookup(): %s" % e)
开发者ID:ktosiu,项目名称:lollypop,代码行数:15,代码来源:lastfm.py

示例4: __on_password_lookup

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_lookup_finish [as 别名]
 def __on_password_lookup(self, source, result):
     """
         Init self object
         @param source as GObject.Object
         @param result Gio.AsyncResult
     """
     try:
         password = Secret.password_lookup_finish(result)
         self.__password = password
         if get_network_available():
             t = Thread(target=self.__connect,
                        args=(self.__username, password))
             t.daemon = True
             t.start()
     except Exception as e:
         print("Lastfm::__on_password_lookup(): %s" % e)
开发者ID:TainakaDrums,项目名称:lollypop,代码行数:18,代码来源:lastfm.py

示例5: on_result_ready

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_lookup_finish [as 别名]
		def on_result_ready(source, result, unused):
			loop.quit()
			password = Secret.password_lookup_finish(result)
			self.assertEquals(None, password)
开发者ID:Pusenka,项目名称:libsecret,代码行数:6,代码来源:test-lookup-password.py

示例6: _on_password_lookup

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_lookup_finish [as 别名]
 def _on_password_lookup(self, source, result):
     password = None
     if result is not None:
         password = Secret.password_lookup_finish(result)
     if password is not None:
         self._password.set_text(password)
开发者ID:yoseforb,项目名称:lollypop,代码行数:8,代码来源:settings.py


注:本文中的gi.repository.Secret.password_lookup_finish方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。