File: SyntaxError.patch

package info (click to toggle)
dbf 0.99.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 972 kB
  • sloc: python: 12,664; makefile: 8
file content (15 lines) | stat: -rw-r--r-- 637 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- a/dbf/_index.py
+++ b/dbf/_index.py
@@ -9,9 +9,9 @@
         filename += '.pdx'
         if not os.path.exists(filename):
             self.index_file = open(filename, 'r+b')
-            self.index_file.write('\xea\xaf\x37\xbf'    # signature
-                '\x00'*8                                # two non-existant lists
-                '\x00'*500)                             # and no indices
+            self.index_file.write(b'\xea\xaf\x37\xbf'
+              + b'\x00'*8
+              + b'\x00'*500)
             return
         index_file = self.index_file = open(filename, 'r+b')
         header = index_file.read(512)