File: python3-compat-2.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 (24 lines) | stat: -rw-r--r-- 867 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: Python 3 print statements
 Fix up the print statements for Python 3.
Author: https://github.com/jkrueger1
Origin: https://github.com/nexusformat/python-nxs/pull/12
--- a/nxs/unit.py
+++ b/nxs/unit.py
@@ -162,7 +162,7 @@
         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 @@
             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():