diff -Nru python-jujuclient-0.50.2/debian/changelog python-jujuclient-0.50.3/debian/changelog --- python-jujuclient-0.50.2/debian/changelog 2015-10-27 13:59:40.000000000 +0000 +++ python-jujuclient-0.50.3/debian/changelog 2015-11-05 09:54:37.000000000 +0000 @@ -1,3 +1,15 @@ +python-jujuclient (0.50.3-1~ubuntu12.04.1~ppa1) precise; urgency=medium + + * No-change backport to precise + + -- Francesco Banconi Thu, 05 Nov 2015 10:54:37 +0100 + +python-jujuclient (0.50.3-1) wily; urgency=medium + + * New build for release 0.50.3. + + -- Francesco Banconi Thu, 05 Nov 2015 10:49:19 +0100 + python-jujuclient (0.50.2-1) wily; urgency=medium * New build for release 0.50.2. diff -Nru python-jujuclient-0.50.2/jujuclient.egg-info/PKG-INFO python-jujuclient-0.50.3/jujuclient.egg-info/PKG-INFO --- python-jujuclient-0.50.2/jujuclient.egg-info/PKG-INFO 2015-10-27 13:32:19.000000000 +0000 +++ python-jujuclient-0.50.3/jujuclient.egg-info/PKG-INFO 2015-11-04 22:50:23.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: jujuclient -Version: 0.50.2 +Version: 0.50.3 Summary: A juju-core/gojuju simple synchronous python api client. Home-page: http://juju.ubuntu.com Author: Kapil Thangavelu diff -Nru python-jujuclient-0.50.2/jujuclient.py python-jujuclient-0.50.3/jujuclient.py --- python-jujuclient-0.50.2/jujuclient.py 2015-07-17 11:54:13.000000000 +0000 +++ python-jujuclient-0.50.3/jujuclient.py 2015-11-04 16:16:38.000000000 +0000 @@ -455,13 +455,23 @@ class TimeoutWatcher(Watcher): # A simple non concurrent watch using signals.. - _timeout = None + def __init__(self, *args, **kw): + super(TimeoutWatcher, self).__init__(*args, **kw) + self.start_time = time.time() + self._timeout = 0 + + def time_remaining(self): + """Return number of seconds until this watch times out. + + """ + return int(self._timeout - (time.time() - self.start_time)) def set_timeout(self, timeout): + self.start_time = time.time() self._timeout = timeout def next(self): - with self._set_alarm(self._timeout): + with self._set_alarm(self.time_remaining()): return super(TimeoutWatcher, self).next() # py3 compat @@ -470,6 +480,9 @@ @classmethod @contextmanager def _set_alarm(cls, timeout): + if timeout < 0: + raise TimeoutError() + try: handler = signal.getsignal(signal.SIGALRM) if callable(handler): diff -Nru python-jujuclient-0.50.2/PKG-INFO python-jujuclient-0.50.3/PKG-INFO --- python-jujuclient-0.50.2/PKG-INFO 2015-10-27 13:32:19.000000000 +0000 +++ python-jujuclient-0.50.3/PKG-INFO 2015-11-04 22:50:23.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: jujuclient -Version: 0.50.2 +Version: 0.50.3 Summary: A juju-core/gojuju simple synchronous python api client. Home-page: http://juju.ubuntu.com Author: Kapil Thangavelu diff -Nru python-jujuclient-0.50.2/setup.py python-jujuclient-0.50.3/setup.py --- python-jujuclient-0.50.2/setup.py 2015-10-27 13:28:18.000000000 +0000 +++ python-jujuclient-0.50.3/setup.py 2015-11-04 22:47:33.000000000 +0000 @@ -6,7 +6,7 @@ setup( name="jujuclient", - version="0.50.2", + version="0.50.3", description="A juju-core/gojuju simple synchronous python api client.", author="Kapil Thangavelu", author_email="kapil.foss@gmail.com",