This commit is contained in:
Kovid Goyal 2011-03-23 13:17:22 -06:00
parent da20ff6502
commit 0e6557fe43
2 changed files with 10 additions and 6 deletions

View File

@ -284,6 +284,7 @@ class Amazon(Source):
'com': _('US'),
'fr' : _('France'),
'de' : _('Germany'),
'uk' : _('UK'),
}
def create_query(self, log, title=None, authors=None, identifiers={}): # {{{
@ -331,7 +332,7 @@ class Amazon(Source):
# }}}
def get_cached_cover_url(self, identifiers):
def get_cached_cover_url(self, identifiers): # {{{
url = None
asin = identifiers.get('amazon', None)
if asin is None:
@ -344,6 +345,7 @@ class Amazon(Source):
url = self.cached_identifier_to_cover_url(asin)
return url
# }}}
def identify(self, log, result_queue, abort, title=None, authors=None, # {{{
identifiers={}, timeout=30):
@ -442,8 +444,7 @@ class Amazon(Source):
return None
# }}}
if __name__ == '__main__':
if __name__ == '__main__': # tests {{{
# To run these test use: calibre-debug -e
# src/calibre/ebooks/metadata/sources/amazon.py
from calibre.ebooks.metadata.sources.test import (test_identify_plugin,
@ -489,5 +490,5 @@ if __name__ == '__main__':
),
])
# }}}

View File

@ -245,8 +245,11 @@ class Colors:
self.__token_info = line[:16]
action = self.__state_dict.get(self.__state)
if action is None:
sys.stderr.write('no matching state in module fonts.py\n')
sys.stderr.write(self.__state + '\n')
try:
sys.stderr.write('no matching state in module fonts.py\n')
sys.stderr.write(self.__state + '\n')
except:
pass
action(line)
copy_obj = copy.Copy(bug_handler = self.__bug_handler)
if self.__copy: