Skip to content

Commit

Permalink
check if file exists in main reader class init
Browse files Browse the repository at this point in the history
  • Loading branch information
sommerc committed Mar 4, 2024
1 parent d98d531 commit 1a5fff3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mastodon_reader/mastodon_reader.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import io
import re
import os
import numpy
import pandas
import struct
Expand Down Expand Up @@ -163,6 +164,7 @@ def _fetch_block(self):

class MastodonReader:
def __init__(self, source_file):
assert os.path.exists(source_file), f"File '{source_file}' does not exist."
self.source_file = source_file

def read_metadata(self):
Expand Down

0 comments on commit 1a5fff3

Please sign in to comment.