From 173379f451b4b041f5dddf0ebbeb5809100117c9 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 14 Apr 2011 09:18:11 +0900 Subject: [PATCH] minor utils tweaks --- anki/storage.py | 2 -- anki/utils.py | 9 ++------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/anki/storage.py b/anki/storage.py index 292f7bb75..db84cea5b 100644 --- a/anki/storage.py +++ b/anki/storage.py @@ -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: diff --git a/anki/utils.py b/anki/utils.py index c2f76a516..611be1e9a 100644 --- a/anki/utils.py +++ b/anki/utils.py @@ -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 ##############################################################################