make sure py2 throws a deprecation notice

unlicense
Laura Liberda 2021-02-26 21:00:17 +01:00 committed by Dominika
parent 2748cc857a
commit 79278413a9
2 changed files with 9 additions and 4 deletions

View File

@ -1,7 +1,10 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# coding: utf-8
from __future__ import unicode_literals
import sys
if sys.version_info[0] == 2:
sys.exit('haruhi-dl no longer works on Python 2, use Python 3 instead')
__license__ = 'LGPL-3.0-or-later'
@ -9,7 +12,6 @@ import codecs
import io
import os
import random
import sys
from .options import (

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import unicode_literals
# Execute with
@ -7,6 +7,9 @@ from __future__ import unicode_literals
import sys
if sys.version_info[0] == 2:
sys.exit('haruhi-dl no longer works on Python 2, use Python 3 instead')
if __package__ is None and not hasattr(sys, 'frozen'):
# direct call of __main__.py
import os.path