mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-01 19:13:55 +02:00
Fix errors found by pylint
This commit is contained in:
parent
f91028fed0
commit
eba26565b8
2 changed files with 15 additions and 1 deletions
|
|
@ -7,6 +7,7 @@
|
|||
import os, shutil
|
||||
from itertools import cycle
|
||||
|
||||
from calibre.devices.errors import FreeSpaceError
|
||||
from calibre.devices.usbms.driver import USBMS
|
||||
import calibre.devices.cybookg3.t2b as t2b
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,22 @@
|
|||
|
||||
from calibre.devices.usbms.device import Device
|
||||
from calibre.devices.usbms.books import BookList, Book
|
||||
from calibre.devices.errors import FreeSpaceError
|
||||
from calibre.devices.errors import FreeSpaceError, PathError
|
||||
from calibre.devices.mime import MIME_MAP
|
||||
|
||||
class File(object):
|
||||
def __init__(self, path):
|
||||
stats = os.stat(path)
|
||||
self.is_dir = os.path.isdir(path)
|
||||
self.is_readonly = not os.access(path, os.W_OK)
|
||||
self.ctime = stats.st_ctime
|
||||
self.wtime = stats.st_mtime
|
||||
self.size = stats.st_size
|
||||
if path.endswith(os.sep):
|
||||
path = path[:-1]
|
||||
self.path = path
|
||||
self.name = os.path.basename(path)
|
||||
|
||||
class USBMS(Device):
|
||||
FORMATS = []
|
||||
EBOOK_DIR_MAIN = ''
|
||||
|
|
|
|||
Loading…
Reference in a new issue