mirror of https://github.com/dirtbags/moth.git
More sensical reporting on file visibility
This commit is contained in:
parent
daebb8bb15
commit
a5f02f15d7
|
@ -163,10 +163,10 @@ you are a fool.
|
|||
body.write("<ul>")
|
||||
for name,puzzlefile in sorted(puzzle.files.items()):
|
||||
if puzzlefile.visible:
|
||||
visibility = 'listed as a generated file'
|
||||
visibility = ''
|
||||
else:
|
||||
visibility = 'unlisted'
|
||||
body.write('<li><a href="/puzzles/{cat}/{points}/{filename}">{filename}</a> ({visibility})</li>'
|
||||
visibility = '(unlisted)'
|
||||
body.write('<li><a href="/puzzles/{cat}/{points}/{filename}">{filename}</a> {visibility}</li>'
|
||||
.format(cat=parts[2],
|
||||
points=puzzle.points,
|
||||
filename=name,
|
||||
|
|
|
@ -108,7 +108,7 @@ class Puzzle:
|
|||
stream = open(name, 'rb')
|
||||
try:
|
||||
name = parts[1]
|
||||
hidden = parts[2]
|
||||
hidden = (parts[2].lower() == "hidden")
|
||||
except IndexError:
|
||||
pass
|
||||
self.files[name] = PuzzleFile(stream, name, not hidden)
|
||||
|
|
Loading…
Reference in New Issue