comparison frontends/src/jp/cmd_blog.py @ 1894:116a55865364

frontends (jp / blog): pass the profile to subprocess when using option --preview
author souliane <souliane@mailoo.org>
date Mon, 07 Mar 2016 19:58:33 +0100
parents 4f252b72b193
children 614f3abb2c69
comparison
equal deleted inserted replaced
1893:4f252b72b193 1894:116a55865364
218 if self.args.preview: 218 if self.args.preview:
219 self.disp(u"Preview requested, launching it", 1) 219 self.disp(u"Preview requested, launching it", 1)
220 # we redirect outputs to /dev/null to avoid console pollution in editor 220 # we redirect outputs to /dev/null to avoid console pollution in editor
221 # if user wants to see messages, (s)he can call "blog preview" directly 221 # if user wants to see messages, (s)he can call "blog preview" directly
222 DEVNULL = open(os.devnull, 'wb') 222 DEVNULL = open(os.devnull, 'wb')
223 subprocess.Popen([sys.argv[0], "blog", "preview", "--inotify", "true", content_file_path], stdout=DEVNULL, stderr=subprocess.STDOUT) 223 subprocess.Popen([sys.argv[0], "blog", "preview", "--inotify", "true", "-p", self.profile, content_file_path], stdout=DEVNULL, stderr=subprocess.STDOUT)
224 224
225 # then we launch editor 225 # then we launch editor
226 editor = config.getConfig(sat_conf, 'jp', 'editor') or os.getenv('EDITOR', 'vi') 226 editor = config.getConfig(sat_conf, 'jp', 'editor') or os.getenv('EDITOR', 'vi')
227 try: 227 try:
228 # is there custom arguments in sat.conf ? 228 # is there custom arguments in sat.conf ?