Stop pretending that we'll ever work with another DBMS.
[mailshears.git] / lib / rm / plugins / agendav.rb
index bebab618b06f190e979fb79c632c7239a409cccf..6d92c26d6fb054d9de44ba5d30b60abec76c2f8d 100644 (file)
@@ -17,26 +17,14 @@ class AgendavRm
     sql_queries = ['DELETE FROM prefs WHERE username = $1;']
     sql_queries << 'DELETE FROM shared WHERE user_from = $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
 
 end