diff options
author | Paweł Jastrzębski <pawelj@iosphe.re> | 2015-01-03 09:41:07 +0100 |
---|---|---|
committer | Paweł Jastrzębski <pawelj@iosphe.re> | 2015-01-04 09:09:33 +0100 |
commit | 147d815057a5d0dfbeab2de54e7f9730f72dce13 (patch) | |
tree | 9924ca399d1cdb611aaad0b11f33cfee5fa61c54 /kcc-c2p.py | |
parent | Improved 7zip detection (diff) | |
download | kcc-147d815057a5d0dfbeab2de54e7f9730f72dce13.tar.gz kcc-147d815057a5d0dfbeab2de54e7f9730f72dce13.tar.bz2 kcc-147d815057a5d0dfbeab2de54e7f9730f72dce13.zip |
Code cleanup
Diffstat (limited to 'kcc-c2p.py')
-rwxr-xr-x | kcc-c2p.py | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/kcc-c2p.py b/kcc-c2p.py index 7388f7f..53216a4 100755 --- a/kcc-c2p.py +++ b/kcc-c2p.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com> -# Copyright (c) 2013-2014 Pawel Jastrzebski <pawelj@iosphe.re> +# Copyright (c) 2013-2015 Pawel Jastrzebski <pawelj@iosphe.re> # # Permission to use, copy, modify, and/or distribute this software for # any purpose with or without fee is hereby granted, provided that the @@ -20,7 +20,7 @@ __version__ = '4.3.1' __license__ = 'ISC' -__copyright__ = '2012-2014, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>' +__copyright__ = '2012-2015, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>' __docformat__ = 'restructuredtext en' import sys @@ -28,33 +28,14 @@ if sys.version_info[0] != 3: print('ERROR: This is Python 3 script!') exit(1) -# Dependency check -missing = [] -try: - # noinspection PyUnresolvedReferences - import PIL - if tuple(map(int, ('2.7.0'.split(".")))) > tuple(map(int, (PIL.PILLOW_VERSION.split(".")))): - missing.append('Pillow 2.7.0+') -except ImportError: - missing.append('Pillow 2.7.0+') -if len(missing) > 0: - try: - # noinspection PyUnresolvedReferences - import tkinter - # noinspection PyUnresolvedReferences - import tkinter.messagebox - importRoot = tkinter.Tk() - importRoot.withdraw() - tkinter.messagebox.showerror('KCC - Error', 'ERROR: ' + ', '.join(missing) + ' is not installed!') - except ImportError: - print('ERROR: ' + ', '.join(missing) + ' is not installed!') - exit(1) +from kcc.shared import dependencyCheck +dependencyCheck(1) from multiprocessing import freeze_support from kcc.comic2panel import main if __name__ == "__main__": freeze_support() - print(('comic2ebook v%(__version__)s. Written by Ciro Mattia Gonano and Pawel Jastrzebski.' % globals())) + print(('comic2panel v%(__version__)s. Written by Ciro Mattia Gonano and Pawel Jastrzebski.' % globals())) main(sys.argv[1:]) sys.exit(0) \ No newline at end of file |