[sysadmin-bin] Use format() instead
- From: Andrea Veri <averi src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Use format() instead
- Date: Wed, 20 Mar 2019 22:19:14 +0000 (UTC)
commit e8cc0a2c915612864c41d40916cd7118bca02392
Author: Andrea Veri <averi redhat com>
Date: Wed Mar 20 23:19:01 2019 +0100
Use format() instead
gitlab/inactive-gitlab-users.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gitlab/inactive-gitlab-users.py b/gitlab/inactive-gitlab-users.py
index ded6500..952f707 100755
--- a/gitlab/inactive-gitlab-users.py
+++ b/gitlab/inactive-gitlab-users.py
@@ -24,4 +24,4 @@ for user in users:
if user.attributes['email'].split('@')[1].split('.')[-2] not in whitelist:
if user.attributes['created_at'].split('T')[0] ==
user.attributes['last_sign_in_at'].split('T')[0]:
if dt.datetime.strptime(user.attributes['created_at'].split('T')[0],
'%Y-%m-%d').date() < (today - timedelta):
- print user.attributes['username'] + ',' + user.attributes['email'] + ',' +
str(user.attributes['id']) + ',' + user.attributes['created_at'].split('T')[0] + ',' +
user.attributes['last_sign_in_at'].split('T')[0]
+ print '{},{},{},{},{}'.format(user.attributes['username'],
user.attributes['email'], user.attributes['id'], user.attributes['created_at'].split('T')[0],
user.attributes['last_sign_in_at'].split('T')[0])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]