aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/se_db.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-08-20 19:04:47 -0400
committerRalph Amissah <ralph@amissah.com>2014-08-20 19:04:47 -0400
commit29fc7f3c14b36770caad64cb82ec9177384ab61a (patch)
treec2079e8bf5d2944d7bc10b55c1b3fb76dcb07cc0 /lib/sisu/v5/se_db.rb
parentv5 v6: hub options, introduce "error override" --no-stop or --errors-as-warnings (diff)
v5 v6: start making use of --no-stop command
Diffstat (limited to 'lib/sisu/v5/se_db.rb')
-rw-r--r--lib/sisu/v5/se_db.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sisu/v5/se_db.rb b/lib/sisu/v5/se_db.rb
index fcb5fc0d..84fd6ba6 100644
--- a/lib/sisu/v5/se_db.rb
+++ b/lib/sisu/v5/se_db.rb
@@ -140,7 +140,12 @@ module SiSU_Info_Db
DBI.connect(psql.dbi,psql.user,psql.db)
end
def conn_pg
- require 'pg'
+ begin
+ require 'pg'
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('pg NOT FOUND (LoadError)')
+ end
PG::Connection.new(dbname: psql.db, port: psql.port)
end
self