Hello community,

here is the log from the commit of package python-python-gammu for 
openSUSE:Factory checked in at 2020-07-27 17:40:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-gammu (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-gammu.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-gammu"

Mon Jul 27 17:40:19 2020 rev:10 rq:822782 version:3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-python-gammu/python-python-gammu.changes  
2020-07-08 19:13:32.407222095 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-python-gammu.new.3592/python-python-gammu.changes
        2020-07-27 17:41:04.391037727 +0200
@@ -1,0 +2,7 @@
+Sat Jul 25 16:29:50 UTC 2020 - Martin Hauke <[email protected]>
+
+- Update to version 3.1
+  * Fix an issue where the gammu worker thread could be brought
+    down if a callback throws an exception
+
+-------------------------------------------------------------------

Old:
----
  python-gammu-3.0.tar.bz2

New:
----
  python-gammu-3.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-python-gammu.spec ++++++
--- /var/tmp/diff_new_pack.h31Xrq/_old  2020-07-27 17:41:05.555038820 +0200
+++ /var/tmp/diff_new_pack.h31Xrq/_new  2020-07-27 17:41:05.559038824 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-python-gammu
-Version:        3.0
+Version:        3.1
 Release:        0
 Summary:        Python module to communicate with mobile phones
 License:        GPL-2.0-or-later

++++++ python-gammu-3.0.tar.bz2 -> python-gammu-3.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-gammu-3.0/NEWS.rst 
new/python-gammu-3.1/NEWS.rst
--- old/python-gammu-3.0/NEWS.rst       2020-06-14 06:25:48.000000000 +0200
+++ new/python-gammu-3.1/NEWS.rst       2020-07-24 13:40:12.000000000 +0200
@@ -1,3 +1,8 @@
+3.1
+===
+
+* Fix an issue where the gammu worker thread could be brought down if a 
callback throws an exception
+
 3.0
 ===
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-gammu-3.0/PKG-INFO 
new/python-gammu-3.1/PKG-INFO
--- old/python-gammu-3.0/PKG-INFO       2020-06-14 06:30:11.010683500 +0200
+++ new/python-gammu-3.1/PKG-INFO       2020-07-24 13:42:53.575508400 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: python-gammu
-Version: 3.0
+Version: 3.1
 Summary: Gammu bindings
 Home-page: https://wammu.eu/python-gammu/
 Author: Michal Cihar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-gammu-3.0/gammu/worker.py 
new/python-gammu-3.1/gammu/worker.py
--- old/python-gammu-3.0/gammu/worker.py        2020-06-14 06:25:48.000000000 
+0200
+++ new/python-gammu-3.1/gammu/worker.py        2020-07-24 13:40:12.000000000 
+0200
@@ -149,12 +149,14 @@
         '''
         return self._name
 
+def gammu_pull_device(state_machine):
+    state_machine.ReadDevice()
 
 class GammuThread(threading.Thread):
     '''
     Thread for phone communication.
     '''
-    def __init__(self, queue, config, callback):
+    def __init__(self, queue, config, callback, pull_func = gammu_pull_device):
         '''
         Initialises thread data.
 
@@ -180,6 +182,7 @@
         self._callback = callback
         self._queue = queue
         self._sm.SetConfig(0, config)
+        self._pull_func = pull_func
 
     def _do_command(self, name, cmd, params, percentage=100):
         '''
@@ -234,7 +237,10 @@
                 if self._terminate:
                     break
                 # Read the device to catch possible incoming events
-                self._sm.ReadDevice()
+                try:
+                    self._pull_func(self._sm)
+                except Exception as ex:
+                    self._callback("ReadDevice", None, ex, 0)
 
     def kill(self):
         '''
@@ -257,7 +263,7 @@
     done, caller is notified via callback.
     '''
 
-    def __init__(self, callback):
+    def __init__(self, callback, pull_func = gammu_pull_device):
         '''
         Initializes worker class.
 
@@ -268,6 +274,7 @@
         self._config = {}
         self._lock = threading.Lock()
         self._queue = queue.Queue()
+        self._pull_func = pull_func
 
     def enqueue_command(self, command, params):
         '''
@@ -331,7 +338,7 @@
         '''
         Connects to phone.
         '''
-        self._thread = GammuThread(self._queue, self._config, self._callback)
+        self._thread = GammuThread(self._queue, self._config, self._callback, 
self._pull_func)
         self._thread.start()
 
     def terminate(self, timeout=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-gammu-3.0/python_gammu.egg-info/PKG-INFO 
new/python-gammu-3.1/python_gammu.egg-info/PKG-INFO
--- old/python-gammu-3.0/python_gammu.egg-info/PKG-INFO 2020-06-14 
06:30:10.000000000 +0200
+++ new/python-gammu-3.1/python_gammu.egg-info/PKG-INFO 2020-07-24 
13:42:53.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: python-gammu
-Version: 3.0
+Version: 3.1
 Summary: Gammu bindings
 Home-page: https://wammu.eu/python-gammu/
 Author: Michal Cihar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-gammu-3.0/setup.py 
new/python-gammu-3.1/setup.py
--- old/python-gammu-3.0/setup.py       2020-06-13 06:23:53.000000000 +0200
+++ new/python-gammu-3.1/setup.py       2020-07-24 13:42:25.000000000 +0200
@@ -36,7 +36,7 @@
 import sys
 
 # some defines
-VERSION = '3.0'
+VERSION = '3.1'
 GAMMU_REQUIRED = '1.37.90'
 README_FILE = os.path.join(os.path.dirname(__file__), 'README.rst')
 with codecs.open(README_FILE, 'r', 'utf-8') as readme:


Reply via email to