Fixed some py2/py3 issues in ID index generation modules.
- Legacy-Id: 17262
This commit is contained in:
parent
21a73ad913
commit
b5697b62ab
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# Copyright The IETF Trust 2010-2019, All Rights Reserved
|
# Copyright The IETF Trust 2010-2020, All Rights Reserved
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Portions Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
# Portions Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
@ -39,10 +39,14 @@ from __future__ import absolute_import, print_function, unicode_literals
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import six
|
import six
|
||||||
|
import sys
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ietf.settings")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ietf.settings")
|
||||||
|
|
||||||
import django
|
import django
|
||||||
django.setup()
|
django.setup()
|
||||||
|
|
||||||
from ietf.idindex.index import all_id2_txt
|
from ietf.idindex.index import all_id2_txt
|
||||||
six.print_(all_id2_txt().encode('utf-8'), end=' ')
|
if six.PY3:
|
||||||
|
sys.stdout.write(all_id2_txt())
|
||||||
|
else:
|
||||||
|
sys.stdout.write(all_id2_txt().encode('utf-8'))
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# Copyright The IETF Trust 2009-2019, All Rights Reserved
|
# Copyright The IETF Trust 2009-2020, All Rights Reserved
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Portions Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
# Portions Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
|
# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
|
||||||
|
@ -38,10 +38,14 @@ from __future__ import absolute_import, print_function, unicode_literals
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import six
|
import six
|
||||||
|
import sys
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ietf.settings")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ietf.settings")
|
||||||
|
|
||||||
import django
|
import django
|
||||||
django.setup()
|
django.setup()
|
||||||
|
|
||||||
from ietf.idindex.index import all_id_txt
|
from ietf.idindex.index import all_id_txt
|
||||||
six.print_(all_id_txt().encode("utf-8"), end=' ')
|
if six.PY3:
|
||||||
|
sys.stdout.write(all_id_txt())
|
||||||
|
else:
|
||||||
|
sys.stdout.write(all_id_txt().encode('utf-8'))
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# Copyright The IETF Trust 2009-2019, All Rights Reserved
|
# Copyright The IETF Trust 2009-2020, All Rights Reserved
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Portions Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
# Portions Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
|
# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
|
||||||
|
@ -38,10 +38,15 @@ from __future__ import absolute_import, print_function, unicode_literals
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import six
|
import six
|
||||||
|
import sys
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ietf.settings")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ietf.settings")
|
||||||
|
|
||||||
import django
|
import django
|
||||||
django.setup()
|
django.setup()
|
||||||
|
|
||||||
from ietf.idindex.index import id_index_txt
|
from ietf.idindex.index import id_index_txt
|
||||||
six.print_(id_index_txt(with_abstracts=True).encode('utf-8'), end=' ')
|
if six.PY3:
|
||||||
|
sys.stdout.write(id_index_txt(with_abstracts=True))
|
||||||
|
else:
|
||||||
|
sys.stdout.write(id_index_txt(with_abstracts=True).encode('utf-8'))
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# Copyright The IETF Trust 2009-2019, All Rights Reserved
|
# Copyright The IETF Trust 2009-2020, All Rights Reserved
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Portions Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
# Portions Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
|
# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
|
||||||
|
@ -38,10 +38,15 @@ from __future__ import absolute_import, print_function, unicode_literals
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import six
|
import six
|
||||||
|
import sys
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ietf.settings")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ietf.settings")
|
||||||
|
|
||||||
import django
|
import django
|
||||||
django.setup()
|
django.setup()
|
||||||
|
|
||||||
from ietf.idindex.index import id_index_txt
|
from ietf.idindex.index import id_index_txt
|
||||||
six.print_(id_index_txt().encode('utf-8'), end=' ')
|
if six.PY3:
|
||||||
|
sys.stdout.write(id_index_txt())
|
||||||
|
else:
|
||||||
|
sys.stdout.write(id_index_txt().encode('utf-8'))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue