With this PR, if init_DB() can connect to the DB without username and password, it will not ask for the credentials. This fixes issue #10.
Additionally, if SERVICE_NAME is the empty string or Null (this happened to me after editing a DB connection in Qgis), it will not be used.
load_raster_layer() drops the credentials form uri_config to avoid the credentials dialog when adding the raster. As I’m not using service files, I am not sure if the existing code deals with that case correctly, because in uri_config there’s just 'service': None.
Adding the layer if I declined to overwrite an existing table seems a bit unexpected to me, so I skipped adding the layer in that case (commit 85a9802844c6027580ceb832411cf62601534f1f).
With this PR, if
init_DB()
can connect to the DB without username and password, it will not ask for the credentials. This fixes issue #10.Additionally, if
SERVICE_NAME
is the empty string or Null (this happened to me after editing a DB connection in Qgis), it will not be used.load_raster_layer()
drops the credentials formuri_config
to avoid the credentials dialog when adding the raster. As I’m not using service files, I am not sure if the existing code deals with that case correctly, because inuri_config
there’s just'service': None
.Adding the layer if I declined to overwrite an existing table seems a bit unexpected to me, so I skipped adding the layer in that case (commit 85a9802844c6027580ceb832411cf62601534f1f).
Also, I fixed a few typos in the Readme.