Description: Fix SyntaxWarning
 Fix SyntaxWarning emitted during the build.
Author: Emmanuel Arias <eamanu@debian.org>
Forwarded: no
Last-Update: 2024-12-09
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/pyqi/commands/make_release.py
+++ b/pyqi/commands/make_release.py
@@ -52,7 +52,7 @@
         with open('ChangeLog.md') as f:
             lineiter = iter(f)
             for line in lineiter:
-                match = re.search('^%s\s+(.*)' % pkg_name, line.strip())
+                match = re.search(r'^%s\s+(.*)' % pkg_name, line.strip())
                 if match is None:
                     continue
                 length = len(match.group(1))
@@ -118,7 +118,7 @@
         cmd = [sys.executable, 'setup.py', 'sdist', 'upload']
         stdout, stderr, retval = pyqi_system_call(cmd, shell=False,
                                                   dry_run=not self.RealRun)
-        if retval is not 0:
+        if retval != 0:
             self._fail("build and upload failed,\nSTDOUT:\n%s\n\nSTDERR:\n%s", 
                        stdout, stderr)
 
@@ -136,7 +136,7 @@
         cmd = ['git', 'tag']
         stdout, stderr, retval = pyqi_system_call(cmd, shell=False,
                                                   dry_run=not self.RealRun)
-        if retval is not 0:
+        if retval != 0:
             self._fail("Could not git tag, \nSTDOUT:\n%s\n\nSTDERR:\n%s", 
                        stdout, stderr)
 
@@ -154,7 +154,7 @@
         cmd = ['git', 'commit', '-am', message]
         stdout, stderr, retval = pyqi_system_call(cmd, shell=False,
                                                   dry_run=not self.RealRun)
-        if retval is not 0:
+        if retval != 0:
             self._fail("Could not git commit, \nSTDOUT:\n%s\n\nSTDERR:\n%s", 
                        stdout, stderr)
 
@@ -163,7 +163,7 @@
         cmd = ['git', 'tag', tag]
         stdout, stderr, retval = pyqi_system_call(cmd, shell=False,
                                                   dry_run=not self.RealRun)
-        if retval is not 0:
+        if retval != 0:
             self._fail("Could not git tag, \nSTDOUT:\n%s\n\nSTDERR:\n%s",stdout,
                  stderr)
 
@@ -172,7 +172,7 @@
 
         # ignoring self.RealRun, always execute
         stdout, stderr, retval = pyqi_system_call(cmd, shell=False)
-        if retval is not 0:
+        if retval != 0:
             self._fail("Could not get git branch, \nSTDOUT:\n%s\n\nSTDERR:\n%s",
                        stdout, stderr)
         return stdout.strip()
@@ -183,7 +183,7 @@
         cmd = ['git','push','upstream', branch]
         stdout, stderr, retval = pyqi_system_call(cmd, shell=False,
                                                   dry_run=not self.RealRun)
-        if retval is not 0:
+        if retval != 0:
             self._fail("Could not push branch %s, \nSTDOUT:\n%s\n\nSTDERR:\n%s",
                        stdout, stderr, branch)
 
@@ -192,7 +192,7 @@
         cmd = ['git','push','upstream',tag]
         stdout, stderr, retval = pyqi_system_call(cmd, shell=False,
                                                   dry_run=not self.RealRun)
-        if retval is not 0:
+        if retval != 0:
             self._fail("Could not push tag %s, \nSTDOUT:\n%s\n\nSTDERR:\n%s",
                        stdout, stderr, tag)
 
--- a/pyqi/core/interfaces/html/__init__.py
+++ b/pyqi/core/interfaces/html/__init__.py
@@ -355,7 +355,7 @@
         write('<table>')
         for i in self._get_inputs():
             full_name = self._html_input_prefix + i.Name
-            if full_name in postvars and i.Type is not 'upload_file':
+            if full_name in postvars and i.Type != 'upload_file':
                 default = i.cast_value(postvars[full_name])
                 write(i.get_html(self._html_input_prefix, value=default))
             else:
