Mercurial > piecrust2
diff piecrust/importing/base.py @ 297:2823ea40cfac
import: Put importer metadata on the class, and allow return values.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 10 Mar 2015 08:34:45 -0700 |
parents | 28958565a17b |
children | 2daa05a21026 |
line wrap: on
line diff
--- a/piecrust/importing/base.py Sun Mar 08 23:00:01 2015 -0700 +++ b/piecrust/importing/base.py Tue Mar 10 08:34:45 2015 -0700 @@ -9,10 +9,9 @@ class Importer(object): - def __init__(self): - self.name = None - self.description = None - self.requires_website = True + name = None + description = None + requires_website = True def setupParser(self, parser, app): raise NotImplementedError() @@ -23,8 +22,7 @@ def checkedImportWebsite(self, ctx): if ctx.app.root_dir is None and self.requires_website: raise SiteNotFoundError() - self.importWebsite(ctx.app, ctx.args) - return 0 + return self.importWebsite(ctx.app, ctx.args) class FileWalkingImporter(Importer):