about summary refs log tree commit diff stats
path: root/browse_slack
diff options
context:
space:
mode:
Diffstat (limited to 'browse_slack')
-rw-r--r--browse_slack/convert_slack.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/browse_slack/convert_slack.py b/browse_slack/convert_slack.py
index 13604e9f..460c4a31 100644
--- a/browse_slack/convert_slack.py
+++ b/browse_slack/convert_slack.py
@@ -70,11 +70,7 @@ def contents(filename):
             except KeyError:
                 stderr.write(repr(item)+'\n')
 
-def filenames(dir):
-    for filename in sorted(listdir(dir)):
-        yield join(dir, filename)
-
 for channel in json.load(open('channels.json')):
-    for filename in filenames(channel['name']):
-        for item in contents(filename):
+    for filename in sorted(listdir(channel['name'])):
+        for item in contents(join(channel['name'], filename)):
             print(f"({json.dumps(item['name'])} {json.dumps(channel['name'])} {item['by']} {json.dumps(item['contents'])})")