def write(self):
curdir = os.getcwd()
os.chdir(os.path.dirname(self.path))
- text = subprocess.check_output(self.path).decode("utf-8")
+ proc = subprocess.Popen(self.path,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
os.chdir(curdir)
- text = text[:1000]
+ stdout, stderr = proc.communicate()
+ text = stdout.decode("utf-8")[:1000]
slug = get_hash(text)
title = ''
if self.first_line_title: