summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorgy Frolov <gosha@fro.lv>2021-01-17 12:01:00 +0300
committerGitHub <noreply@github.com>2021-01-17 12:01:00 +0300
commit29df547b5a90d9314680c53cf158ac9bc7583472 (patch)
tree5e8acd8d1b0e4054fcb43e58adc47af3aa72bdda
parenta1d6b855c6d12a3f3891cfe152968ba70af4e7cc (diff)
parent53c83ce5376a962a19ab04c9457c28d6dac90d29 (diff)
Merge branch 'master' into RW/unreached-exception
-rw-r--r--changelog.md13
-rw-r--r--mycli/AUTHORS1
-rw-r--r--mycli/__init__.py2
-rw-r--r--mycli/config.py2
-rwxr-xr-xmycli/main.py4
5 files changed, 17 insertions, 5 deletions
diff --git a/changelog.md b/changelog.md
index edf1cd4..c6e5688 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,10 +1,17 @@
TBD
-===
+=======
Bug Fixes:
----------
* Allow `FileNotFound` exception for SSH config files.
+1.23.2
+===
+
+Bug Fixes:
+----------
+* Ensure `--port` is always an int.
+
1.23.1
===
@@ -15,6 +22,10 @@ Bug Fixes:
1.23.0
===
+Bug Fixes:
+----------
+* Fix config file include logic
+
Features:
---------
diff --git a/mycli/AUTHORS b/mycli/AUTHORS
index 221ce8b..e87a29c 100644
--- a/mycli/AUTHORS
+++ b/mycli/AUTHORS
@@ -75,6 +75,7 @@ Contributors:
* Zach DeCook
* kevinhwang91
* KITAGAWA Yasutaka
+ * Andy Teijelo PĂ©rez
* bitkeen
* Morgan Mitchell
* Massimiliano Torromeo
diff --git a/mycli/__init__.py b/mycli/__init__.py
index a039e2f..375471f 100644
--- a/mycli/__init__.py
+++ b/mycli/__init__.py
@@ -1 +1 @@
-__version__ = '1.23.1'
+__version__ = '1.23.2'
diff --git a/mycli/config.py b/mycli/config.py
index e0f2d1f..9c592fb 100644
--- a/mycli/config.py
+++ b/mycli/config.py
@@ -244,7 +244,7 @@ def str_to_bool(s):
elif s.lower() in false_values:
return False
else:
- raise ValueError('not a recognized boolean value: %s'.format(s))
+ raise ValueError('not a recognized boolean value: {0}'.format(s))
def strip_matching_quotes(s):
diff --git a/mycli/main.py b/mycli/main.py
index f5debcd..6d98b0a 100755
--- a/mycli/main.py
+++ b/mycli/main.py
@@ -89,7 +89,7 @@ class MyCli(object):
'/etc/my.cnf',
'/etc/mysql/my.cnf',
'/usr/local/etc/my.cnf',
- '~/.my.cnf'
+ os.path.expanduser('~/.my.cnf'),
]
# check XDG_CONFIG_HOME exists and not an empty string
@@ -397,7 +397,7 @@ class MyCli(object):
socket = socket or cnf['socket'] or guess_socket_location()
user = user or cnf['user'] or os.getenv('USER')
host = host or cnf['host']
- port = port or cnf['port']
+ port = int(port or cnf['port'] or 3306)
ssl = ssl or {}
passwd = passwd if isinstance(passwd, str) else cnf['password']