Add cleanup method to profiles to support logging out.

This commit is contained in:
Kovid Goyal 2007-12-03 16:56:23 +00:00
parent 29bbe3e72a
commit ad25f2057f
2 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -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)