jp (blog/preview): fixed call to getCurrentFile
This commit is contained in:
parent
5e7579e1bd
commit
cdba0078b8
1 changed files with 3 additions and 2 deletions
|
|
@ -622,13 +622,14 @@ class Edit(base.CommandBase, BlogPublishCommon, common.BaseEdit):
|
|||
self.edit(content_file_path, content_file_obj, mb_data=mb_data)
|
||||
|
||||
|
||||
class Preview(base.CommandBase):
|
||||
class Preview(base.CommandBase, common.BaseEdit):
|
||||
# TODO: need to be rewritten with template output
|
||||
|
||||
def __init__(self, host):
|
||||
base.CommandBase.__init__(
|
||||
self, host, "preview", use_verbose=True, help=_(u"preview a blog content")
|
||||
)
|
||||
common.BaseEdit.__init__(self, self.host, BLOG_TMP_DIR, use_metadata=True)
|
||||
|
||||
def add_parser_options(self):
|
||||
self.parser.add_argument(
|
||||
|
|
@ -751,7 +752,7 @@ class Preview(base.CommandBase):
|
|||
|
||||
# which file do we need to edit?
|
||||
if self.args.file == "current":
|
||||
self.content_file_path = self.getCurrentFile(sat_conf, self.profile)
|
||||
self.content_file_path = self.getCurrentFile(self.profile)
|
||||
else:
|
||||
self.content_file_path = os.path.abspath(self.args.file)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue