Yann Leboulanger pushed to branch master at gajim / gajim
Commits:
-
0eec41ee
by Emmanuel Gil Peyrot at 2017-01-03T21:14:27+00:00
-
5173a2d1
by Yann Leboulanger at 2017-01-03T22:20:14+01:00
1 changed file:
Changes:
| ... | ... | @@ -51,28 +51,18 @@ if os.name == 'nt': |
| 51 | 51 |
|
| 52 | 52 |
warnings.filterwarnings(action='ignore')
|
| 53 | 53 |
|
| 54 |
-HAS_NBXMPP=True
|
|
| 55 | 54 |
MIN_NBXMPP_VER = "0.5.3"
|
| 56 | 55 |
from gi.repository import GLib
|
| 57 | 56 |
try:
|
| 58 | 57 |
import nbxmpp
|
| 59 | 58 |
except ImportError:
|
| 60 |
- HAS_NBXMPP=False
|
|
| 61 |
- |
|
| 62 |
-if not HAS_NBXMPP:
|
|
| 63 | 59 |
print('Gajim needs python-nbxmpp to run. Quiting...')
|
| 64 |
- sys.exit()
|
|
| 60 |
+ sys.exit(1)
|
|
| 65 | 61 |
|
| 66 |
-try:
|
|
| 67 |
- from distutils.version import LooseVersion as V
|
|
| 68 |
- if V(nbxmpp.__version__) < V(MIN_NBXMPP_VER):
|
|
| 69 |
- HAS_NBXMPP=False
|
|
| 70 |
-except:
|
|
| 71 |
- HAS_NBXMPP=False
|
|
| 72 |
- |
|
| 73 |
-if not HAS_NBXMPP:
|
|
| 62 |
+from distutils.version import LooseVersion as V
|
|
| 63 |
+if V(nbxmpp.__version__) < V(MIN_NBXMPP_VER):
|
|
| 74 | 64 |
print('Gajim needs python-nbxmpp >= %s to run. Quiting...' % MIN_NBXMPP_VER)
|
| 75 |
- sys.exit()
|
|
| 65 |
+ sys.exit(1)
|
|
| 76 | 66 |
|
| 77 | 67 |
if os.name == 'nt':
|
| 78 | 68 |
import locale
|