Skip to content

Commit

Permalink
python2 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrinux committed Jun 13, 2018
1 parent bced76b commit eec5c31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions py3status/modules/file_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def post_config_hook(self):
if isinstance(self.path, str):
self.path = [self.path]
# expand user paths
self.path = [*map(expanduser, self.path)]
self.path = list(map(expanduser, self.path))

def file_status(self):
if self.path is None:
Expand All @@ -74,8 +74,8 @@ def file_status(self):
'cached_until': self.py3.CACHE_FOREVER,
}

# expand user to paths
paths = [*map(glob, self.path)]
# expand glob from paths
paths = list(map(glob, self.path))
# merge list of paths
paths = [x for x in chain.from_iterable(paths)]

Expand Down

0 comments on commit eec5c31

Please sign in to comment.