[Blends-commit] [SCM] website branch, master, updated. 02bb478c1de7000525825a3a5307c3020212439c

Andreas Tille tille at debian.org
Mon Jan 25 20:32:37 UTC 2016


The following commit has been merged in the master branch:
commit 02bb478c1de7000525825a3a5307c3020212439c
Author: Andreas Tille <tille at debian.org>
Date:   Mon Jan 25 15:42:04 2016 +0100

    psutils has changed interfacde and get_pid_list() does not exist any more in newer implementations

diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index 84e6958..cb36008 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -234,7 +234,11 @@ def LockBlendsTools():
             lf = open(LOCKFILE, 'r')
             pid = int(lf.readline())
             lf.close()
-            if pid in psutil.get_pid_list():
+            try: # psutils has changed interfacde and get_pid_list() does not exist any more in newer implementations
+                pidlist=psutil.get_pid_list()
+            except AttributeError:
+                pidlist=psutil.pids()
+            if pid in pidlist:
                 logger.error("Another process rebuilding web sentinel pages with PID %i is running. Exit." % pid)
                 exit()
             else:
diff --git a/webtools_py3/blendstasktools_udd.py b/webtools_py3/blendstasktools_udd.py
index 5379bf9..be60565 100644
--- a/webtools_py3/blendstasktools_udd.py
+++ b/webtools_py3/blendstasktools_udd.py
@@ -243,7 +243,11 @@ def LockBlendsTools():
             lf = open(LOCKFILE, 'r')
             pid = int(lf.readline())
             lf.close()
-            if pid in psutil.get_pid_list():
+            try: # psutils has changed interfacde and get_pid_list() does not exist any more in newer implementations
+                pidlist=psutil.get_pid_list()
+            except AttributeError:
+                pidlist=psutil.pids()
+            if pid in pidlist:
                 logger.error("Another process rebuilding web sentinel pages with PID %i is running. Exit." % pid)
                 exit()
             else:

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list