Fix lists when encountering inacessible entries

master
sanqui 2016-08-31 18:36:37 +00:00
parent e0f2f64d02
commit 1a823c3e3d
1 changed files with 4 additions and 1 deletions

View File

@ -290,7 +290,10 @@ def meta(entries = FILES):
for filename in entries:
mtime = os.path.getmtime(filename)
wc = subprocess.check_output(["wc","-w",filename]).split()[0]
try:
wc = subprocess.check_output(["wc","-w",filename], stderr=subprocess.STDOUT).split()[0]
except subprocess.CalledProcessError:
wc = "???"
timestamp = time.strftime("%Y-%m-%d at %H:%M", time.localtime(mtime))
date = "-".join(parse_date(filename))
author = os.path.split(os.path.split(os.path.split(os.path.split(filename)[0])[0])[0])[1]