summarylogtreecommitdiffstats
path: root/fix-swig-len.patch
diff options
context:
space:
mode:
Diffstat (limited to 'fix-swig-len.patch')
-rw-r--r--fix-swig-len.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/fix-swig-len.patch b/fix-swig-len.patch
new file mode 100644
index 000000000000..2c5516dcfa2a
--- /dev/null
+++ b/fix-swig-len.patch
@@ -0,0 +1,20 @@
+Description: swig >2.0.4 returns a long but __len__() should return an int
+ Fix the following error when showing 'Bands' or 'DOS and Bands':
+ TypeError: __len__() should return an int
+Author: Graham Inggs <ginggs@debian.org>
+Forwarded: yes
+Last-Update: 2015-11-16
+--- lib/p4vasp/FArray.py
++++ lib/p4vasp/FArray.py
+@@ -74,9 +74,8 @@
+ else:
+ cp4vasp.FArray2D.__init__(self,n,m)
+
+- __len__=cp4vasp.FArray2D.sizeX
+-
+-
++ def __len__(self):
++ return int(cp4vasp.FArray2D.sizeX(self))
+ def __getitem__(self,i):
+ return FArray1D(pointer=self.getArray(i))
+ def __setitem__(self,i,l):