Skip to content

Commit 0592328

Browse files
committed
Fix: Flake8 reports.
1 parent aa02b66 commit 0592328

4 files changed

Lines changed: 2 additions & 7 deletions

File tree

webtranslate/rights.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ def has_access(page, roles):
118118
@return: Whether access is granted.
119119
@rtype: C{bool}
120120
"""
121-
global _table
122-
123121
if "USER" not in roles:
124122
roles = set(["SOMEONE"])
125123

webtranslate/users/development.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ def authenticate(user, pwd):
6262
@return: Whether the combination is valid (C{True} means 'valid').
6363
@rtype: C{bool}
6464
"""
65-
global _users
66-
6765
if len(pwd) == 0:
6866
return False
6967
return (user, pwd) in _users

webtranslate/users/ldap.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def init():
6363
"""
6464
Initialize the user admin system.
6565
"""
66-
global server, ldap_host
66+
global server
6767
import ldap3
6868

6969
rights.init_page_access()
@@ -89,7 +89,6 @@ def get_authentication(user, pwd):
8989
# Note that failure to authenticate is not fatal, it falls back to an 'unknown' user.
9090
groups = set()
9191
if user is not None and user != "" and pwd is not None and pwd != "":
92-
global server, ldap_basedn_users, ldap_basedn_groups
9392
import ldap3
9493

9594
try:

webtranslate/users/redmine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def connect():
7575
@return: Whether we are connected (not 100% certain).
7676
@rtype: C{bool}
7777
"""
78-
global db_type, db_schema, db_name, db_password, db_user, db_host, db_port, db_connection
78+
global db_connection
7979

8080
if db_connection is not None:
8181
return True # Already connected.

0 commit comments

Comments
 (0)