diff options
author | Badlop <badlop@process-one.net> | 2011-12-21 12:58:58 +0100 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2011-12-21 12:58:58 +0100 |
commit | 919cdc27dba1b3c1c0a1f68d329815439f021321 (patch) | |
tree | 14f7ea7fdacc562a58123929e476b53cab72c32d | |
parent | Support Erlang/OTP R15B driver (EJAB-1521) (diff) |
Fix update with stripped beams (thanks to Jose M Herrero)(EJAB-1520)
-rw-r--r-- | src/ejabberd_update.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ejabberd_update.erl b/src/ejabberd_update.erl index 6bb35481..c6aed4db 100644 --- a/src/ejabberd_update.erl +++ b/src/ejabberd_update.erl @@ -128,8 +128,10 @@ get_new_version(Module) -> get_current_version(Module) -> Attrs = Module:module_info(attributes), - {value, {vsn, CurVsn}} = lists:keysearch(vsn, 1, Attrs), - CurVsn. + case lists:keysearch(vsn, 1, Attrs) of + {value, {vsn, CurVsn}} -> CurVsn; + _ -> unknown_version + end. %% @spec(Dir::string(), UpdatedBeams::[atom()]) -> {Script,LowLevelScript,Check} build_script(Dir, UpdatedBeams) -> |