Clean up user/domain describing in the plugins.
[mailshears.git] / lib / common / dovecot_plugin.rb
index 4718483bec420e0e11731502597069300c816cb4..bc6166d6a1716ee7954083fb10460ad00e54b30d 100644 (file)
@@ -14,27 +14,11 @@ module DovecotPlugin
   end
 
   def describe_domain(domain)
-    begin
-      domain_path = get_domain_path(domain)
-      return domain_path
-    rescue NonexistentDomainError => e
-      return "Doesn't exist: #{e.to_s}"
-    end
+    return get_domain_path(domain)
   end
 
   def describe_user(user)
-    begin
-      user_path = get_user_path(user)
-      return user_path
-    rescue NonexistentUserError => e
-      return "Doesn't exist: #{e.to_s}"
-    end
-  end
-
-
-  def domain_exists(domain)
-    domains = list_domains()
-    return domains.include?(domain)
+    return get_user_path(user)
   end