Fixed the errors, and warnings reported by pylama.

TODO::
- Don't use unicode in Python 3 for removing the support of Python 2 (
  psycopg2 driver - __init__.py, server_manager.py).
- Merge the lastest pgcli (version: 3.0.0) for SQL autocompletion.
This commit is contained in:
Ashesh Vashi
2020-05-08 14:13:32 +05:30
parent 9338bdcb3a
commit e73e2d2502
10 changed files with 43 additions and 49 deletions

View File

@@ -72,7 +72,7 @@ def unescape_dquotes_process_arg(arg):
def _log_exception():
type_, value_, traceback_ = info = sys.exc_info()
type_, value_, traceback_ = sys.exc_info()
with open(_log_file, 'a') as fp:
from traceback import format_exception
@@ -352,7 +352,7 @@ def execute(argv):
args.update({'exit_code': e.errno})
# Unknown errors
except Exception:
except Exception as e:
info = _log_exception()
args.update({'exit_code': 501})
if process_stderr: