Skip to content

Commit

Permalink
return namespace (instead of session instance) on Session.new_from_file
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsulc committed Feb 15, 2011
1 parent e5b56d2 commit 1de22f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/sugarcrm/session.rb
Expand Up @@ -58,10 +58,11 @@ def self.current_user
def self.new_from_file(path, opts={})
config = load_and_parse_config(path)
begin
self.new(config[:base_url], config[:username], config[:password], opts)
session = self.new(config[:base_url], config[:username], config[:password], opts)
rescue MissingCredentials => e
return false
end
session.namespace_const
end

# re-use this session and namespace if the user wants to connect with different credentials
Expand Down

0 comments on commit 1de22f6

Please sign in to comment.