Check Python version

This commit is contained in:
Star Brilliant 2013-11-03 18:20:45 +08:00
parent b36420af2f
commit 8ef9c8e790

View File

@ -18,6 +18,8 @@ import xml.dom.minidom
__all__ = ["Danmaku2ASS"] __all__ = ["Danmaku2ASS"]
if sys.version_info < (3,):
raise RuntimeError('at least Python 3.0 is required')
gettext.install('danmaku2ass', os.path.join(os.path.dirname(os.path.abspath(os.path.realpath(sys.argv[0] or 'locale'))), 'locale')) gettext.install('danmaku2ass', os.path.join(os.path.dirname(os.path.abspath(os.path.realpath(sys.argv[0] or 'locale'))), 'locale'))