diff options
| author | mryouse | 2022-05-26 00:50:38 +0000 |
|---|---|---|
| committer | mryouse | 2022-05-26 00:50:38 +0000 |
| commit | 9ce7dd3bc706d2a3c9599c184001e1482e10e218 (patch) | |
| tree | 1b2b2f878a4a4759761f8fd8a84a9669d932cb96 /neb.py | |
| parent | d98e17f6301d6d23ba0a9fe5c640089ffe5f62fd (diff) | |
bugfix: actually pass the file name to the function
Diffstat (limited to 'neb.py')
| -rw-r--r-- | neb.py | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -40,13 +40,9 @@ def repl(): print(f"panic! {e}") -def run_file(): +def run_file(filename): - if len(sys.argv) != 2: - print("usage: neb <file>") - sys.exit(1) - - with open(sys.argv[1], "r") as fil: + with open(filename, "r") as fil: data = fil.read() try: |
