Stop pretending that we'll ever work with another DBMS.
[mailshears.git] / lib / rm / plugins / davical.rb
index 3526dcff2fa4f9fc57950c32ac50e34c44d6872c..77b06b4777714a50a7ea18aa15e2116389128b2b 100644 (file)
@@ -20,26 +20,14 @@ class DavicalRm
 
     sql_queries = ['DELETE FROM usr WHERE username = $1']
 
-    begin
-      connection = PGconn.connect(@db_host,
-                                  @db_port,
-                                  @db_opts,
-                                  @db_tty,
-                                  @db_name,
-                                  @db_user,
-                                  @db_pass)
-
-      sql_queries.each do |sql_query|
-        connection.query(sql_query, [user.to_s()])
-      end
-
-      connection.close()
-
-    rescue PGError => e
-      # Pretend like we're database-agnostic in case we ever are.
-      raise DatabaseError.new(e)
+    connection = PGconn.connect(@db_host, @db_port, @db_opts, @db_tty,
+                                @db_name, @db_user, @db_pass)
+
+    sql_queries.each do |sql_query|
+      connection.query(sql_query, [user.to_s()])
     end
 
+    connection.close()
   end