summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2020-07-13 11:45:38 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2020-07-13 11:45:38 (GMT)
commit08cc64357536b0d44d7ba3863608fcca8af6608b (patch)
tree8f4a067309d68ec49a23265269b7bb18036922a5
parent92b92533a765033a04b9658ca689e0635780182a (diff)
downloadmisc-fred-08cc64357536b0d44d7ba3863608fcca8af6608b.zip
misc-fred-08cc64357536b0d44d7ba3863608fcca8af6608b.tar.gz
misc-fred-08cc64357536b0d44d7ba3863608fcca8af6608b.tar.bz2
grandlyon/scripts: adapt to authentic port to py3
-rw-r--r--grandlyon/scripts/copy-roles.py4
-rw-r--r--grandlyon/scripts/mark-admin-roles.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/grandlyon/scripts/copy-roles.py b/grandlyon/scripts/copy-roles.py
index 45a6d40..7ddc54b 100644
--- a/grandlyon/scripts/copy-roles.py
+++ b/grandlyon/scripts/copy-roles.py
@@ -9,8 +9,8 @@ Role = get_role_model()
mapping = {}
-name_src = sys.argv[1].decode('utf-8')
-name_dst = sys.argv[2].decode('utf-8')
+name_src = sys.argv[1]
+name_dst = sys.argv[2]
ou_src = Ou.objects.get(name=name_src)
ou = Ou.objects.get(name=name_dst)
diff --git a/grandlyon/scripts/mark-admin-roles.py b/grandlyon/scripts/mark-admin-roles.py
index d535cd3..66afc58 100644
--- a/grandlyon/scripts/mark-admin-roles.py
+++ b/grandlyon/scripts/mark-admin-roles.py
@@ -13,7 +13,7 @@ from django_rbac.utils import get_role_model, get_ou_model
Ou = get_ou_model()
Role = get_role_model()
-name_dst = sys.argv[1].decode('utf-8')
+name_dst = sys.argv[1]
ou = Ou.objects.get(name=name_dst)
role = Role.objects.get(name=u'Administrateur %s' % name_dst, ou=ou)