Fix #1471976 [Folder Device Interface add ppt extension](https://bugs.launchpad.net/calibre/+bug/1471976)

This commit is contained in:
Kovid Goyal 2015-07-07 08:21:21 +05:30
parent a0cefcf704
commit 9bce68c323

View File

@ -17,7 +17,7 @@ class FOLDER_DEVICE_FOR_CONFIG(USBMS):
description = _('Use an arbitrary folder as a device.') description = _('Use an arbitrary folder as a device.')
author = 'John Schember/Charles Haley' author = 'John Schember/Charles Haley'
supported_platforms = ['windows', 'osx', 'linux'] supported_platforms = ['windows', 'osx', 'linux']
FORMATS = list(BOOK_EXTENSIONS) FORMATS = list(BOOK_EXTENSIONS) + ['ppt', 'pptx']
VENDOR_ID = [0xffff] VENDOR_ID = [0xffff]
PRODUCT_ID = [0xffff] PRODUCT_ID = [0xffff]
@ -58,7 +58,7 @@ class FOLDER_DEVICE(USBMS):
def __init__(self, path): def __init__(self, path):
if not os.path.isdir(path): if not os.path.isdir(path):
raise IOError, 'Path is not a folder' raise IOError('Path is not a folder')
path = USBMS.normalize_path(path) path = USBMS.normalize_path(path)
if path.endswith(os.sep): if path.endswith(os.sep):
self._main_prefix = path self._main_prefix = path
@ -105,5 +105,3 @@ class FOLDER_DEVICE(USBMS):
@classmethod @classmethod
def save_settings(cls, config_widget): def save_settings(cls, config_widget):
return FOLDER_DEVICE_FOR_CONFIG.save_settings(config_widget) return FOLDER_DEVICE_FOR_CONFIG.save_settings(config_widget)