make sure py2 throws a deprecation notice
This commit is contained in:
parent
2748cc857a
commit
79278413a9
|
@ -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 (
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue