From: Michael Orlitzky Date: Thu, 6 Jan 2011 17:03:30 +0000 (-0500) Subject: Make describe_domain work (for DovecotMailstore) even after a domain is removed. X-Git-Tag: 0.0.1~125 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=ca82d7f3afbb7fabaf2a832c6ebd8fa8b4b6624f;p=mailshears.git Make describe_domain work (for DovecotMailstore) even after a domain is removed. --- diff --git a/src/plugins/dovecot_mailstore.rb b/src/plugins/dovecot_mailstore.rb index d253c32..40b2019 100644 --- a/src/plugins/dovecot_mailstore.rb +++ b/src/plugins/dovecot_mailstore.rb @@ -6,13 +6,18 @@ require 'src/plugin' class DovecotMailstore < Mailstore include Plugin - + def initialize @domain_root = Configuration::MAIL_ROOT end def describe_domain(domain) - return get_domain_path(domain) + begin + domain_path = get_domain_path(domain) + return domain_path + rescue NonexistentDomainError => e + return e.message + end end def describe_account(account)