File: compile-with-python3.patch

package info (click to toggle)
xmds2 3.0.0+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,956 kB
  • sloc: python: 64,216; cpp: 3,929; ansic: 1,463; makefile: 115; sh: 54
file content (39 lines) | stat: -rw-r--r-- 1,382 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
35
36
37
38
39
Description: Adjust subprocess.py for compilation with Python3
Author: Rafael Laboissiere <rafael@debian.org>
Bug-Debian: https://bugs.debian.org/929148
Forwarded: https://sourceforge.net/p/xmds/mailman/message/36673954/
Last-Update: 2019-05-19

--- xmds2-2.3.0~rc1+dfsg.orig/xpdeint/waf/waflib/extras/subprocess.py
+++ xmds2-2.3.0~rc1+dfsg/xpdeint/waf/waflib/extras/subprocess.py
@@ -55,12 +55,6 @@ try:
 except:
     MAXFD = 256
 
-try:
-    False
-except NameError:
-    False = 0
-    True = 1
-
 _active = []
 
 def _cleanup():
@@ -311,7 +305,7 @@ class Popen(object):
                 startupinfo.wShowWindow = SW_HIDE
                 comspec = os.environ.get("COMSPEC", "cmd.exe")
                 args = comspec + " /c " + args
-                if (GetVersion() >= 0x80000000L or
+                if (GetVersion() >= 0x80000000 or
                         os.path.basename(comspec).lower() == "command.com"):
                     w9xpopen = self._find_w9xpopen()
                     args = '"%s" %s' % (w9xpopen, args)
@@ -319,7 +313,7 @@ class Popen(object):
 
             try:
                 hp, ht, pid, tid = CreateProcess(executable, args, None, None, 1, creationflags, env, cwd, startupinfo)
-            except pywintypes.error, e:
+            except pywintypes.error as e:
                 raise WindowsError(*e.args)
 
             self._child_created = True