File: replacing-isAlive-with-is_alive.patch

package info (click to toggle)
solarwolf 1.5%2Bdfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,656 kB
  • sloc: python: 5,353; ansic: 159; makefile: 102; pascal: 50; sh: 27
file content (34 lines) | stat: -rw-r--r-- 1,239 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Author: Judit Foglszinger <urbec@debian.org>
Description: Replacing isAlive with is_alive
 solarwolf fails to start because of an AttributeError: Thread object
 has no attribute isAlive. The function was removed in Python 3.9. The patch
 replaces it with the new one is_alive().
Bug-Debian: https://bugs.debian.org/984673
Forwarded: no
Reviewed-By: Markus Koschany
Last-Update: 2021-03-12

--- solarwolf-1.5+dfsg1.orig/code/gameinit.py
+++ solarwolf-1.5+dfsg1/code/gameinit.py
@@ -161,7 +161,7 @@ class GameInit:
 
         now = pygame.time.get_ticks()
         #we let the screen stay up for at about 1 second
-        if not self.thread.isAlive():
+        if not self.thread.is_alive():
             if load_finished_status >= 0:
                 if now-self.starttime > 1200:
                     self.quit()
--- solarwolf-1.5+dfsg1.orig/code/gamenews.py
+++ solarwolf-1.5+dfsg1/code/gamenews.py
@@ -234,7 +234,7 @@ class GameNews:
         self.clocks += 1
         self.cleartext()
 
-        if self.thread and (not self.thread.isAlive() and self.success):
+        if self.thread and (not self.thread.is_alive() and self.success):
             self.download_finished()
 
         clearme = None