Remove error-handling clause The error tuple returned is not tested by the caller so it serves only to crash the binary comprehension in an obscure way.
Project: http://git-wip-us.apache.org/repos/asf/couchdb-setup/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-setup/commit/9728b342 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-setup/tree/9728b342 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-setup/diff/9728b342 Branch: refs/heads/master Commit: 9728b342a58b8c59a749f605d17375666871042a Parents: be52f7e Author: Robert Newson <[email protected]> Authored: Tue Nov 25 11:55:35 2014 +0000 Committer: Robert Newson <[email protected]> Committed: Tue Nov 25 11:55:35 2014 +0000 ---------------------------------------------------------------------- src/setup.erl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/9728b342/src/setup.erl ---------------------------------------------------------------------- diff --git a/src/setup.erl b/src/setup.erl index f774608..c48a616 100644 --- a/src/setup.erl +++ b/src/setup.erl @@ -165,10 +165,7 @@ get_port(Port) when is_integer(Port) -> get_port(Port) when is_list(Port) -> list_to_binary(Port); get_port(Port) when is_binary(Port) -> - Port; -get_port(Port) -> - {error, <<"invalid type for port">>}. - + Port. create_node_doc(Host, Port) -> {ok, Db} = couch_db:open_int(<<"nodes">>, []),
