Skip to content

Commit

Permalink
strip lines in readonly file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Grout committed Jun 17, 2012
1 parent 1048e15 commit 6da6a95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sagenb/storage/filesystem_storage.py
Expand Up @@ -619,7 +619,7 @@ def readonly_user(self, username):
mtime = os.path.getmtime(filename)
if mtime > self._readonly_mtime:
with open(filename) as f:
self._readonly = set(line[:-1] for line in f if len(line[:-1])>0)
self._readonly = set(line for line in (l.strip() for l in f) if len(line)>0)
self._readonly_mtime = mtime
return username in self._readonly

Expand Down

0 comments on commit 6da6a95

Please sign in to comment.