mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
minor utils tweaks
This commit is contained in:
parent
84d59e4b01
commit
173379f451
2 changed files with 2 additions and 9 deletions
|
@ -189,8 +189,6 @@ create index if not exists ix_fsums_csum on fsums (csum);
|
|||
|
||||
# 2.0 schema migration
|
||||
######################################################################
|
||||
# we don't have access to the progress handler at this point, so the GUI code
|
||||
# will need to set up a progress handling window before opening a deck.
|
||||
|
||||
def _moveTable(db, table, cards=False):
|
||||
if cards:
|
||||
|
|
|
@ -169,19 +169,14 @@ def entsToTxt(html):
|
|||
##############################################################################
|
||||
|
||||
def hexifyID(id):
|
||||
if id < 0:
|
||||
id += 18446744073709551616L
|
||||
return "%x" % id
|
||||
|
||||
def dehexifyID(id):
|
||||
id = int(id, 16)
|
||||
if id >= 9223372036854775808L:
|
||||
id -= 18446744073709551616L
|
||||
return id
|
||||
return int(id, 16)
|
||||
|
||||
def ids2str(ids):
|
||||
"""Given a list of integers, return a string '(int1,int2,...)'."""
|
||||
return "(%s)" % ",".join([str(i) for i in ids])
|
||||
return "(%s)" % ",".join(str(i) for i in ids)
|
||||
|
||||
# Tags
|
||||
##############################################################################
|
||||
|
|
Loading…
Reference in a new issue