Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
74ec44e3
Commit
74ec44e3
authored
Apr 23, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mysql: make 'user' actually optional in the DB connection string
parent
87c1de3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
neo/storage/database/mysqldb.py
neo/storage/database/mysqldb.py
+5
-3
No files found.
neo/storage/database/mysqldb.py
View file @
74ec44e3
...
@@ -117,9 +117,11 @@ class MySQLDatabaseManager(DatabaseManager):
...
@@ -117,9 +117,11 @@ class MySQLDatabaseManager(DatabaseManager):
return
super
(
MySQLDatabaseManager
,
self
).
__getattr__
(
attr
)
return
super
(
MySQLDatabaseManager
,
self
).
__getattr__
(
attr
)
def
_tryConnect
(
self
):
def
_tryConnect
(
self
):
kwd
=
{
'db'
:
self
.
db
,
'user'
:
self
.
user
}
kwd
=
{
'db'
:
self
.
db
}
if
self
.
passwd
is
not
None
:
if
self
.
user
:
kwd
[
'passwd'
]
=
self
.
passwd
kwd
[
'user'
]
=
self
.
user
if
self
.
passwd
is
not
None
:
kwd
[
'passwd'
]
=
self
.
passwd
if
self
.
socket
:
if
self
.
socket
:
kwd
[
'unix_socket'
]
=
os
.
path
.
expanduser
(
self
.
socket
)
kwd
[
'unix_socket'
]
=
os
.
path
.
expanduser
(
self
.
socket
)
logging
.
info
(
'connecting to MySQL on the database %s with user %s'
,
logging
.
info
(
'connecting to MySQL on the database %s with user %s'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment