File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -41,14 +41,20 @@ def _extract_author(auth):
4141
4242
4343def _extract_language (alpha_3 ):
44+ if not alpha_3 :
45+ return _read_language ()
4446 try :
4547 return pycountry .languages .get (alpha_3 = alpha_3 ).name
4648 except AttributeError :
4749 try :
4850 return pycountry .languages .get (alpha_2 = alpha_3 [:2 ]).name
4951 except AttributeError :
5052 # I give up
51- return input ('Please specify the book\' s Language: ' )
53+ return _read_language ()
54+
55+
56+ def _read_language ():
57+ return input ('Please specify the book\' s Language: ' )
5258
5359
5460def _extract_shelves (shelves , take ):
@@ -104,7 +110,7 @@ def search(self, path):
104110
105111 if isbn :
106112 log .debug ("Searching Goodreads by ISBN {} for '{}'" ,
107- isbn , book [ 'Title' ] )
113+ isbn , book . get ( 'Title' , isbn ) )
108114 return self .show_by_isbn (isbn )
109115 elif book ['Title' ]:
110116 search_term = book ['Title' ]
You can’t perform that action at this time.
0 commit comments