[Qgis-developer] Python: QgsDataSourceURI.setConnection with SSL

Andreas Neumann a.neumann at carto.net
Mon Nov 21 10:24:53 EST 2011


 Hi Python devs,

 I am looking for an example with the correct syntax for setting a 
 Postgis connection with SSLmode = SSLdisable.

 I tried:

 pgUri = QgsDataSourceURI()
 pgUri.setConnection("servicename","dbname","username","pw",QgsDataSourceURI.SSLmode.SSLdisable)

 but the last part with the SSLdisable does not work.

 Do you know how to correctly set SSL to disable with Python?

 Thanks,
 Andreas

-- 
 --
 Andreas Neumann
 Böschacherstrasse 10A
 8624 Grüt (Gossau ZH)
 Switzerland


More information about the Qgis-developer mailing list