File: is-with-literal.patch

package info (click to toggle)
siconos 4.4.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 78,332 kB
  • sloc: cpp: 160,975; ansic: 129,999; fortran: 33,051; python: 21,001; xml: 1,244; sh: 385; makefile: 318
file content (21 lines) | stat: -rw-r--r-- 862 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Stephen Sinclair <radarsat1@gmail.com>
Date: Sun, 7 Jun 2020 16:02:35 +0000
Subject: Fix a Python warning about 'is' with a literal.

---
 kernel/swig/fromXml.py.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/swig/fromXml.py.in b/kernel/swig/fromXml.py.in
index bb8b30b..6b3823c 100644
--- a/kernel/swig/fromXml.py.in
+++ b/kernel/swig/fromXml.py.in
@@ -430,7 +430,7 @@ def buildModelXML(xmlFile):
     for osnspType in dataOSNSP.keys():
         if simxml.OneStepNSProblems_List.__dict__[osnspType] is not None:
             for osnspxml in simxml.OneStepNSProblems_List.__dict__[osnspType]:
-                if osnspType is 'FrictionContact':
+                if osnspType == 'FrictionContact':
                     typeFC = int(osnspxml.Type)
                     osnsp = SK.FrictionContact(typeFC)
                 else: