that's possible to have several md5sum in the same list
This commit is contained in:
parent
d8fecab254
commit
01f5c101a4
1 changed files with 8 additions and 4 deletions
|
|
@ -140,10 +140,14 @@ class VirtKeyboard(object):
|
||||||
s += " "
|
s += " "
|
||||||
return hashlib.md5(s).hexdigest()
|
return hashlib.md5(s).hexdigest()
|
||||||
|
|
||||||
def get_symbol_code(self, md5sum):
|
def get_symbol_code(self, md5sum_list):
|
||||||
for i in self.md5:
|
if isinstance(md5sum_list, basestring):
|
||||||
if md5sum == self.md5[i]:
|
md5sum_list = [md5sum_list]
|
||||||
return i
|
|
||||||
|
for md5sum in md5sum_list:
|
||||||
|
for i in self.md5:
|
||||||
|
if md5sum == self.md5[i]:
|
||||||
|
return i
|
||||||
raise VirtKeyboardError('Symbol not found for hash "%s".' % md5sum)
|
raise VirtKeyboardError('Symbol not found for hash "%s".' % md5sum)
|
||||||
|
|
||||||
def get_string_code(self, string):
|
def get_string_code(self, string):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue