|
13 | 13 | import warnings |
14 | 14 | from textwrap import fill |
15 | 15 |
|
16 | | - |
17 | 16 | PY3 = (sys.version_info[0] >= 3) |
18 | 17 |
|
19 | 18 |
|
@@ -1789,12 +1788,12 @@ def check_requirements(self): |
1789 | 1788 | return "unknown (can not use multiprocessing to determine)" |
1790 | 1789 | try: |
1791 | 1790 | res = p.map_async(backend_gtk3agg_internal_check, [0]) |
1792 | | - success, msg = res.get(timeout=5)[0] |
1793 | | - except Queue.Empty: |
| 1791 | + success, msg = res.get(timeout=10)[0] |
| 1792 | + except multiprocessing.TimeoutError: |
1794 | 1793 | p.terminate() |
1795 | 1794 | # No result returned. Probaly hanging, terminate the process. |
1796 | 1795 | success = False |
1797 | | - raise |
| 1796 | + raise CheckFailed("Check timed out") |
1798 | 1797 | except: |
1799 | 1798 | p.close() |
1800 | 1799 | # Some other error. |
@@ -1864,12 +1863,12 @@ def check_requirements(self): |
1864 | 1863 | return "unknown (can not use multiprocessing to determine)" |
1865 | 1864 | try: |
1866 | 1865 | res = p.map_async(backend_gtk3cairo_internal_check, [0]) |
1867 | | - success, msg = res.get(timeout=5)[0] |
1868 | | - except Queue.Empty: |
| 1866 | + success, msg = res.get(timeout=10)[0] |
| 1867 | + except multiprocessing.TimeoutError: |
1869 | 1868 | p.terminate() |
1870 | 1869 | # No result returned. Probaly hanging, terminate the process. |
1871 | 1870 | success = False |
1872 | | - raise |
| 1871 | + raise CheckFailed("Check timed out") |
1873 | 1872 | except: |
1874 | 1873 | p.close() |
1875 | 1874 | success = False |
@@ -2012,11 +2011,11 @@ def check_requirements(self): |
2012 | 2011 | # Multiprocessing OK |
2013 | 2012 | try: |
2014 | 2013 | res = p.map_async(self.callback, [self]) |
2015 | | - msg = res.get(timeout=5)[0] |
2016 | | - except Queue.Empty: |
| 2014 | + msg = res.get(timeout=10)[0] |
| 2015 | + except multiprocessing.TimeoutError: |
2017 | 2016 | p.terminate() |
2018 | 2017 | # No result returned. Probaly hanging, terminate the process. |
2019 | | - raise |
| 2018 | + raise CheckFailed("Check timed out") |
2020 | 2019 | except: |
2021 | 2020 | # Some other error. |
2022 | 2021 | p.close() |
|
0 commit comments