about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-08-10 04:25:44 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-08-10 04:25:44 -0700
commit639f89ca42ed8082f6ae60ba7e11fbe0fa6bae1c (patch)
treeae8ea14350337f2842da03af047eb6b84125166f
parentf09ee2aa19922e7416ee85d376e60f3e03c860ef (diff)
downloadmu-639f89ca42ed8082f6ae60ba7e11fbe0fa6bae1c.tar.gz
.
Vestige from when we were scanning all files in the current directory
rather than channels.json.
-rw-r--r--browse_slack/convert_slack.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/browse_slack/convert_slack.py b/browse_slack/convert_slack.py
index a1a91278..ee8de392 100644
--- a/browse_slack/convert_slack.py
+++ b/browse_slack/convert_slack.py
@@ -79,10 +79,7 @@ def filenames(dir):
             yield result
 
 for dir in channels.values():
-    try:
-        for filename in filenames(dir):
-            print(filename)
-            for item in contents(filename):
-                print(f"({json.dumps(item['name'])} {json.dumps(dir)} {item['by']} {json.dumps(item['contents'])})")
-    except NotADirectoryError:
-        pass
+    for filename in filenames(dir):
+        print(filename)
+        for item in contents(filename):
+            print(f"({json.dumps(item['name'])} {json.dumps(dir)} {item['by']} {json.dumps(item['contents'])})")