Skip to content

Commit

Permalink
Sort files by name in views
Browse files Browse the repository at this point in the history
  • Loading branch information
zertrin committed Nov 13, 2013
1 parent 2c0d578 commit 439dcdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rezoirclogs/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,14 @@ def __getitem__(self, name):

@property
def dirs(self):
for name in self.fs.listdir(self.path):
for name in sorted(self.fs.listdir(self.path)):
path = self.fs.join(self.path, name)
if self.fs.isrealdir(path):
yield self._make_dir(name)

@property
def chans(self):
files = (name for name in self.fs.listdir(self.path)
files = (name for name in sorted(self.fs.listdir(self.path))
if self.fs.isrealfile(self.fs.join(self.path, name)) and name.endswith('.log'))

for chan in set(name.rsplit('.', 2)[0] for name in files):
Expand Down

0 comments on commit 439dcdc

Please sign in to comment.