【发布时间】:2016-10-26 01:14:06
【问题描述】:
我正在为 Ida(在 python 中)编写一个使用 Etcd 远程键值存储系统的插件。我的问题是当我尝试锁定服务器时
lock = etcd.Lock(self.client, 'ida_lock')
Should timeout after 30 seconds. Hopefully that is enough.
lock.acquire(blocking=True,lock_ttl=None,timeout=30)
if lock.is_acquired:
data,idc_file = self.get_idc_data()
if os.path.isfile('expendable.idc'):
self.client.write('/fREd/' + self.md5 + '/all/', idc_file, prevValue = open('expendable.idc','r').readlines())
else:
self.client.write('/fREd/' + self.md5 + '/all/', idc_file)
lock.release()
就像这样,Ida 冻结了,我想知道是否有人对为什么会发生这种情况或如何解决它有任何见解。
因此,作为参考,包含此方法的方法是通过键盘快捷键调用的
idaapi.add_hotkey('Ctrl-.', self.push_data)
毫无疑问,是锁导致了问题。
你可以在https://github.com/jplana/python-etcd查看python-etcd源码
【问题讨论】: