File: python-syntaxwarning.patch

package info (click to toggle)
python-nxs 4.4.1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 888 kB
  • sloc: python: 2,752; makefile: 152; sh: 10
file content (22 lines) | stat: -rw-r--r-- 788 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
--- a/nxs/napi.py
+++ b/nxs/napi.py
@@ -1137,7 +1137,7 @@
 
         Corresponds to NXgetattr(handle,name,data,&length,&storage)
         """
-        if dtype is 'char': length += 1  # HDF4 needs zero-terminator
+        if dtype == 'char': length += 1  # HDF4 needs zero-terminator
         dummy_data,pdata,size,datafn = self._poutput(str(dtype),[length])
         storage = c_int(_nxtype_code[str(dtype)])
         # print("getattr", self._loc(), name, length, size, dtype)
--- a/nxs/tree.py
+++ b/nxs/tree.py
@@ -539,7 +539,7 @@
     The delimiter separating each axis can be white space, a comma, or a colon.
     """
     import re
-    sep=re.compile('[\[]*(\s*,*:*)+[\]]*')
+    sep=re.compile(r'[\[]*(\s*,*:*)+[\]]*')
     return filter(lambda x: len(x)>0, sep.split(axes))