publisher: only sql.cleanup_connection when using SQL

This commit is contained in:
Thomas NOËL 2015-01-09 18:40:24 +01:00
parent a3a3b4bf5d
commit 935626b63f
1 changed files with 3 additions and 1 deletions

View File

@ -198,7 +198,9 @@ class WcsPublisher(StubWcsPublisher):
return QommonPublisher.try_publish(self, request)
def cleanup(self):
sql.cleanup_connection()
if self.has_site_option('postgresql') and get_cfg('postgresql', {}):
import sql
sql.cleanup_connection()
set_publisher_class(WcsPublisher)
WcsPublisher.register_extra_dir(os.path.join(os.path.dirname(__file__), 'extra'))