actions: Check with flake8

Also fix flake8 warnings.

Closes: #1613

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil@medhas.org split multi strings differently to avoid spaces]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Veiko Aasa authored and Sunil Mohan Adapa committed 2019-10-10 19:08:45 -07:00
1 parent 938e83ade6
commit ed646d84a5
15 files changed
+44 -37

No files matched your search

+1 -1
View File
@@ -290,7 +290,7 @@ def get_user_groups(username):
groups_part = output.split(' ')[2]
groups = groups_part.split('=')[1]
group_names = [
user.strip('()') for user in re.findall('\(.*?\)', groups)
user.strip('()') for user in re.findall(r'\(.*?\)', groups)
]
group_names.remove('users')
return group_names