mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
54f320f30d
commit
f53b7a8782
@ -173,14 +173,14 @@ class DBCtx(object):
|
|||||||
def path(self, path):
|
def path(self, path):
|
||||||
if self.is_remote:
|
if self.is_remote:
|
||||||
with lopen(path, 'rb') as f:
|
with lopen(path, 'rb') as f:
|
||||||
return f.read()
|
return path, f.read()
|
||||||
return path
|
return path
|
||||||
|
|
||||||
def run(self, name, *args):
|
def run(self, name, *args):
|
||||||
m = module_for_cmd(name)
|
m = module_for_cmd(name)
|
||||||
if self.is_remote:
|
if self.is_remote:
|
||||||
return self.remote_run(name, m, *args)
|
return self.remote_run(name, m, *args)
|
||||||
return m.implementation(self.db, False, *args)
|
return m.implementation(self.db, None, *args)
|
||||||
|
|
||||||
def interpret_http_error(self, err):
|
def interpret_http_error(self, err):
|
||||||
if err.code == httplib.UNAUTHORIZED:
|
if err.code == httplib.UNAUTHORIZED:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user