mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add cleanup method to profiles to support logging out.
This commit is contained in:
parent
29bbe3e72a
commit
ad25f2057f
@ -160,6 +160,10 @@ def process_profile(args, options, logger=None):
|
|||||||
finally:
|
finally:
|
||||||
os.chdir(cwd)
|
os.chdir(cwd)
|
||||||
finally:
|
finally:
|
||||||
|
try:
|
||||||
|
profile.cleanup()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
if tdir and os.path.isdir(tdir):
|
if tdir and os.path.isdir(tdir):
|
||||||
if options.keep_downloaded_files:
|
if options.keep_downloaded_files:
|
||||||
print 'Downloaded files in ', tdir
|
print 'Downloaded files in ', tdir
|
||||||
|
@ -212,6 +212,9 @@ class DefaultProfile(object):
|
|||||||
return articles
|
return articles
|
||||||
|
|
||||||
|
|
||||||
|
def cleanup(self):
|
||||||
|
pass
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def process_html_description(cls, tag):
|
def process_html_description(cls, tag):
|
||||||
src = '\n'.join(tag.contents)
|
src = '\n'.join(tag.contents)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user