File: 0003-python3-compat-2.patch

package info (click to toggle)
python-nxs 4.4.1-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: python: 2,751; makefile: 152; sh: 10
file content (34 lines) | stat: -rw-r--r-- 1,147 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
From: Debian Science Maintainers
 <debian-science-maintainers@lists.alioth.debian.org>
Date: Sun, 21 Dec 2025 16:22:50 +1100
Subject: Python 3 print statements

Origin: https://github.com/nexusformat/python-nxs/pull/12

Fix up the print statements for Python 3.
---
 nxs/unit.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nxs/unit.py b/nxs/unit.py
index 1bcf807..e94734a 100644
--- a/nxs/unit.py
+++ b/nxs/unit.py
@@ -162,7 +162,7 @@ class Converter(object):
         else:
             self.scalemap = {'': 1}
             self.scalebase = 1
-            #raise ValueError, "Unknown unit %s"%name
+            #raise ValueError("Unknown unit %s"%name)
 
     def scale(self, units=""):
         if units == "" or self.scalemap is None: return 1
@@ -181,7 +181,7 @@ class Converter(object):
             raise KeyError("%s not in %s"%(units," ".join(self.scalemap.keys())))
 
 def _check(expect,get):
-    if expect != get: raise ValueError, "Expected %s but got %s"%(expect,get)
+    if expect != get: raise ValueError("Expected %s but got %s"%(expect,get))
     #print expect,"==",get
 
 def test():