[sysadmin-bin] Reduce scope of the targeted users
- From: Andrea Veri <averi src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Reduce scope of the targeted users
- Date: Fri, 22 Mar 2019 12:00:16 +0000 (UTC)
commit 6d742233a20869efa7c1887329b3365fb45eacb1
Author: Andrea Veri <averi redhat com>
Date: Fri Mar 22 12:59:50 2019 +0100
Reduce scope of the targeted users
gitlab/inactive-gitlab-users.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gitlab/inactive-gitlab-users.py b/gitlab/inactive-gitlab-users.py
index 13c54c2..78f5eda 100755
--- a/gitlab/inactive-gitlab-users.py
+++ b/gitlab/inactive-gitlab-users.py
@@ -27,8 +27,8 @@ for user in users:
if user.attributes['username'] != 'ghost':
if not user.attributes['last_activity_on'] and user.attributes['current_sign_in_at']:
if user.attributes['email'].split('@')[1].split('.')[-2] not in whitelist:
- if len(user.events.list()) == 0:
- if user.attributes['created_at'].split('T')[0] ==
user.attributes['current_sign_in_at'].split('T')[0]:
+ if user.attributes['created_at'].split('T')[0] ==
user.attributes['current_sign_in_at'].split('T')[0]:
+ if len(user.events.list()) == 0:
if dt.datetime.strptime(user.attributes['created_at'].split('T')[0],
'%Y-%m-%d').date() < (today - timedelta):
print '{},{},{},{},{}'.format(user.attributes['username'],
user.attributes['email'], user.attributes['id'], user.attributes['created_at'].split('T')[0],
user.attributes['current_sign_in_at'].split('T')[0])
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]