rupa / j2

python version of z, for experimentation
240 stars 23 forks source link

Error when ~/.j file does not exist #1

Closed digitalhobbit closed 15 years ago

digitalhobbit commented 15 years ago

I was getting the error below attempting to run "j". Creating an empty "~/.j" file (using "touch ~/.j") did the trick.

mirko@Zork-2 ~$ j
Traceback (most recent call last):
  File "/Users/mirko/External/j2/j.py", line 179, in <module>
    main(opts.file, opts.l, opts.t, args)
  File "/Users/mirko/External/j2/j.py", line 139, in main
    j = J(file)
  File "/Users/mirko/External/j2/j.py", line 34, in __init__
    with open(self.datafile, 'r') as f:
IOError: [Errno 21] Is a directory: '/Users/mirko/.j'
rupa commented 15 years ago

handle missing .j file without error. Closed by 8bc0199e5a08e0267de6311dc26d643d0ab70cb4