Fix get_type/2 by accepting list as type #5

Merged
merged 1 commit into from Apr 8, 2013

Conversation

Projects
None yet
2 participants
@hirotnk

hirotnk commented Apr 6, 2013

when executable command takes arguments, type is list and it causes following error:

localhost [/home/hirotnk/repo/github/grapherl%] ./grapherl -m -t png "/usr/lib64/erlang/lib/thrift-0.8.0/ebin" thrift.png [1:39 13-04-06]
escript: exception error: bad argument
in function atom_to_list/1
called as atom_to_list("png")
in call from grapherl:get_type/2 (src/grapherl.erl, line 199)
in call from grapherl:create/3 (src/grapherl.erl, line 216)
in call from grapherl:modules/3 (src/grapherl.erl, line 160)
in call from grapherl:run/2 (src/grapherl.erl, line 88)
in call from escript:run/2 (escript.erl, line 741)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_it/1

Yoshihiro Tanaka
Fix get_type/2 by accepting list as type
when executable command takes arguments, type is list and it causes following error:

localhost [/home/hirotnk/repo/github/grapherl%] ./grapherl -m -t png "/usr/lib64/erlang/lib/thrift-0.8.0/ebin" thrift.png                                                                                                                          [1:39 13-04-06]
escript: exception error: bad argument
  in function  atom_to_list/1
     called as atom_to_list("png")
  in call from grapherl:get_type/2 (src/grapherl.erl, line 199)
  in call from grapherl:create/3 (src/grapherl.erl, line 216)
  in call from grapherl:modules/3 (src/grapherl.erl, line 160)
  in call from grapherl:run/2 (src/grapherl.erl, line 88)
  in call from escript:run/2 (escript.erl, line 741)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_it/1
@eproxus

This comment has been minimized.

Show comment Hide comment
@eproxus

eproxus Apr 8, 2013

Owner

Thanks!

Owner

eproxus commented Apr 8, 2013

Thanks!

eproxus added a commit that referenced this pull request Apr 8, 2013

Merge pull request #5 from hirotnk/feature/type_fix
Fix get_type/2 by accepting list as type

@eproxus eproxus merged commit 24c86c7 into eproxus:master Apr 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment