Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
04275d31
Commit
04275d31
authored
5 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: use logger instead of print; cosmetics
parent
ac5b6df7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caosdb/connection/connection.py
+8
-5
8 additions, 5 deletions
src/caosdb/connection/connection.py
with
8 additions
and
5 deletions
src/caosdb/connection/connection.py
+
8
−
5
View file @
04275d31
...
...
@@ -32,13 +32,13 @@ from builtins import str # pylint: disable=redefined-builtin
from
errno
import
EPIPE
as
BrokenPipe
from
socket
import
error
as
SocketError
from
caosdb.version
import
version
from
caosdb.configuration
import
get_config
from
caosdb.exceptions
import
(
AuthorizationException
,
CaosDBException
,
ClientErrorException
,
ConfigurationException
,
ConnectionException
,
EntityDoesNotExistError
,
LoginFailedException
,
ServerErrorException
,
URITooLongException
)
from
caosdb.version
import
version
from
pkg_resources
import
resource_filename
from
.interface
import
CaosDBHTTPResponse
,
CaosDBServerConnection
...
...
@@ -178,10 +178,10 @@ class _DefaultCaosDBServerConnection(CaosDBServerConnection):
context
.
verify_mode
=
ssl
.
CERT_REQUIRED
if
config
.
get
(
"
ssl_insecure
"
):
print
(
"
*** Warning! ***
\n
"
"
Insecure SSL mode, certificate will not be checked!
"
"
Please consider removing the `ssl_insecure` configuration option.
\n
"
"
****************
"
,
file
=
sys
.
stderr
)
_LOGGER
.
warn
(
"
*** Warning! ***
\n
"
"
Insecure SSL mode, certificate will not be checked!
"
"
Please consider removing the `ssl_insecure` configuration option.
\n
"
"
****************
"
,
file
=
sys
.
stderr
)
context
.
verify_mode
=
ssl
.
CERT_NONE
if
(
not
context
.
verify_mode
==
ssl
.
CERT_NONE
and
...
...
@@ -347,13 +347,16 @@ def configure_connection(**kwargs):
# Convert config to dict, with preserving types
int_opts
=
[
"
timeout
"
]
bool_opts
=
[
"
ssl_insecure
"
]
if
conf
.
has_section
(
"
Connection
"
):
global_conf
=
dict
(
conf
.
items
(
"
Connection
"
))
# Integer options
for
opt
in
int_opts
:
if
opt
in
global_conf
:
global_conf
[
opt
]
=
conf
.
getint
(
"
Connection
"
,
opt
)
# Boolean options
for
opt
in
bool_opts
:
if
opt
in
global_conf
:
global_conf
[
opt
]
=
conf
.
getboolean
(
"
Connection
"
,
opt
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment