Skip to content

Commit

Permalink
Fix zmq version checking.
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>
  • Loading branch information
mraspaud committed Mar 3, 2015
1 parent 0aa2778 commit 01bcbff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions trollcast/client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) 2012, 2013, 2014 SMHI
# Copyright (c) 2012, 2013, 2014, 2015 SMHI

# Author(s):

Expand Down Expand Up @@ -39,7 +39,7 @@
import numpy as np
from posttroll.message import Message, strp_isoformat
from posttroll import context
from zmq import Context, REQ, LINGER, Poller, POLLIN, SUB, SUBSCRIBE, VERSION_MAJOR
from zmq import Context, REQ, LINGER, Poller, POLLIN, SUB, SUBSCRIBE, zmq_version
import os.path
from urlparse import urlunparse
from trollsift import compose
Expand All @@ -56,7 +56,7 @@
CLIENT_TIMEOUT = timedelta(seconds=45)

REQ_TIMEOUT = 1000
if VERSION_MAJOR < 3:
if zmq_version().startswith("2."):
REQ_TIMEOUT *= 1000
BUFFER_TIME = 2.0

Expand Down

0 comments on commit 01bcbff

Please sign in to comment.