From 7d81b1dddf72190cb585cb1125a10dfffd61c3e7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 1 Jun 2019 21:34:10 +0530 Subject: [PATCH] Fix for ContentType not being defined error for extension-less non kepub files on a Kobo --- src/calibre/devices/kobo/driver.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py index bd5458ac62..d05f063748 100644 --- a/src/calibre/devices/kobo/driver.py +++ b/src/calibre/devices/kobo/driver.py @@ -638,6 +638,7 @@ class KOBO(USBMS): def get_content_type_from_path(self, path): # Strictly speaking the ContentType could be 6 or 10 # however newspapers have the same storage format + ContentType = 901 if path.find('kepub') >= 0: ContentType = 6 return ContentType