mirror of
https://github.com/alvierahman90/otfm-python.git
synced 2025-01-12 10:14:22 +00:00
don't error if macros file does not exist
This commit is contained in:
parent
77bc93456a
commit
a3d80f5703
@ -230,8 +230,11 @@ def main(args):
|
||||
|
||||
# get macros
|
||||
|
||||
with open(args.macros_file) as file:
|
||||
macros = get_macros(file.read())
|
||||
try:
|
||||
with open(args.macros_file) as file:
|
||||
macros = get_macros(file.read())
|
||||
except FileNotFoundError:
|
||||
macros = {}
|
||||
|
||||
# get tokens (file contents)
|
||||
if args.input == "-":
|
||||
|
Loading…
Reference in New Issue
Block a user