Skip to content

Commit

Permalink
add_ebook now copes with ones without an ASIN
Browse files Browse the repository at this point in the history
  • Loading branch information
palfrey committed Oct 7, 2011
1 parent 3aa8094 commit f4b4b89
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kindle.py
Expand Up @@ -78,7 +78,10 @@ def add_asin(self, collection, asin, booktype):
self[collection].add_hash(asin)

def add_ebook(self, collection, ebook):
self.add_asin(collection, ebook.asin, ebook.type)
if ebook.asin != None:
self.add_asin(collection, ebook.asin, ebook.type)
else:
self.add_filehash(collection, ebook.hash)

class Ebook():
def __init__(self, path):
Expand Down

0 comments on commit f4b4b89

Please sign in to comment.