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

@@ -15,11 +15,6 @@ import re
import getpass
if 'raw_input' in __builtins__:
input = raw_input
range = xrange
def user_info():
if config.SERVER_MODE is False:
print(u"NOTE: Configuring authentication for DESKTOP mode.")
@@ -48,9 +43,10 @@ def user_info():
)
email_filter = re.compile(
"^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9]"
"(?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9]"
"(?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$")
"^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9]"
"(?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9]"
"(?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$"
)
email = input("Email address: ")
while email == '' or not email_filter.match(email):