Debian Codegraph @

debian/patches/fix-syntax-warning.patch

raw symbols SCIP
1 Description: Fix SyntaxWarning
2 Fix SyntaxWarning emitted during the build.
3 Author: Emmanuel Arias <[email protected]>
4 Forwarded: no
5 Last-Update: 2024-12-09
6 ---
7 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
8 --- a/pyqi/commands/make_release.py
9 +++ b/pyqi/commands/make_release.py
10 @@ -52,7 +52,7 @@
11 with open('ChangeLog.md') as f:
12 lineiter = iter(f)
13 for line in lineiter:
14 - match = re.search('^%s\s+(.*)' % pkg_name, line.strip())
15 + match = re.search(r'^%s\s+(.*)' % pkg_name, line.strip())
16 if match is None:
17 continue
18 length = len(match.group(1))
19 @@ -118,7 +118,7 @@
20 cmd = [sys.executable, 'setup.py', 'sdist', 'upload']
21 stdout, stderr, retval = pyqi_system_call(cmd, shell=False,
22 dry_run=not self.RealRun)
23 - if retval is not 0:
24 + if retval != 0:
25 self._fail("build and upload failed,\nSTDOUT:\n%s\n\nSTDERR:\n%s",
26 stdout, stderr)
27
28 @@ -136,7 +136,7 @@
29 cmd = ['git', 'tag']
30 stdout, stderr, retval = pyqi_system_call(cmd, shell=False,
31 dry_run=not self.RealRun)
32 - if retval is not 0:
33 + if retval != 0:
34 self._fail("Could not git tag, \nSTDOUT:\n%s\n\nSTDERR:\n%s",
35 stdout, stderr)
36
37 @@ -154,7 +154,7 @@
38 cmd = ['git', 'commit', '-am', message]
39 stdout, stderr, retval = pyqi_system_call(cmd, shell=False,
40 dry_run=not self.RealRun)
41 - if retval is not 0:
42 + if retval != 0:
43 self._fail("Could not git commit, \nSTDOUT:\n%s\n\nSTDERR:\n%s",
44 stdout, stderr)
45
46 @@ -163,7 +163,7 @@
47 cmd = ['git', 'tag', tag]
48 stdout, stderr, retval = pyqi_system_call(cmd, shell=False,
49 dry_run=not self.RealRun)
50 - if retval is not 0:
51 + if retval != 0:
52 self._fail("Could not git tag, \nSTDOUT:\n%s\n\nSTDERR:\n%s",stdout,
53 stderr)
54
55 @@ -172,7 +172,7 @@
56
57 # ignoring self.RealRun, always execute
58 stdout, stderr, retval = pyqi_system_call(cmd, shell=False)
59 - if retval is not 0:
60 + if retval != 0:
61 self._fail("Could not get git branch, \nSTDOUT:\n%s\n\nSTDERR:\n%s",
62 stdout, stderr)
63 return stdout.strip()
64 @@ -183,7 +183,7 @@
65 cmd = ['git','push','upstream', branch]
66 stdout, stderr, retval = pyqi_system_call(cmd, shell=False,
67 dry_run=not self.RealRun)
68 - if retval is not 0:
69 + if retval != 0:
70 self._fail("Could not push branch %s, \nSTDOUT:\n%s\n\nSTDERR:\n%s",
71 stdout, stderr, branch)
72
73 @@ -192,7 +192,7 @@
74 cmd = ['git','push','upstream',tag]
75 stdout, stderr, retval = pyqi_system_call(cmd, shell=False,
76 dry_run=not self.RealRun)
77 - if retval is not 0:
78 + if retval != 0:
79 self._fail("Could not push tag %s, \nSTDOUT:\n%s\n\nSTDERR:\n%s",
80 stdout, stderr, tag)
81
82 --- a/pyqi/core/interfaces/html/__init__.py
83 +++ b/pyqi/core/interfaces/html/__init__.py
84 @@ -355,7 +355,7 @@
85 write('<table>')
86 for i in self._get_inputs():
87 full_name = self._html_input_prefix + i.Name
88 - if full_name in postvars and i.Type is not 'upload_file':
89 + if full_name in postvars and i.Type != 'upload_file':
90 default = i.cast_value(postvars[full_name])
91 write(i.get_html(self._html_input_prefix, value=default))
92 else: