Skip to content

Commit f3442f4

Browse files
authored
Merge pull request dbcli#880 from earboxer/emptypass
* Command Line: Allow specifying empty password
2 parents 69e9fc2 + 00c467a commit f3442f4

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

changelog.md

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ Features:
2727
* Add an option `--list-ssh-config` to list ssh configurations.
2828
* Add an option `--ssh-config-path` to choose ssh configuration path.
2929

30+
Bug Fixes:
31+
----------
32+
33+
* Fix specifying empty password with `--password=''` when config file has a password set (Thanks: [Zach DeCook]).
34+
3035

3136
1.21.1
3237
======
@@ -778,4 +783,5 @@ Bug Fixes:
778783
[François Pietka]: https://github.com/fpietka
779784
[Frederic Aoustin]: https://github.com/fraoustin
780785
[Georgy Frolov]: https://github.com/pasenor
786+
[Zach DeCook]: https://zachdecook.com
781787
[laixintao]: https://github.com/laixintao

mycli/AUTHORS

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ Contributors:
7272
* Jakub Boukal
7373
* Takeshi D. Itoh
7474
* laixintao
75+
* Zach DeCook
7576
* kevinhwang91
7677
* KITAGAWA Yasutaka
7778

78-
7979
Creator:
8080
--------
8181

mycli/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def connect(self, database='', user='', passwd='', host='', port='',
396396
port = port or cnf['port']
397397
ssl = ssl or {}
398398

399-
passwd = passwd or cnf['password']
399+
passwd = passwd if isinstance(passwd, str) else cnf['password']
400400
charset = charset or cnf['default-character-set'] or 'utf8'
401401

402402
# Favor whichever local_infile option is set.

0 commit comments

Comments
 (0)