aboutsummaryrefslogtreecommitdiff
path: root/lib/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.py')
-rw-r--r--lib/util.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/util.py b/lib/util.py
index 0b7778f..7a9caf7 100644
--- a/lib/util.py
+++ b/lib/util.py
@@ -6,25 +6,25 @@
# If it occurs more than once, remove the first occurrence.
#
def remove(item, list):
- for i in range(len(list)):
- if list[i] = item:
- del list[i]
- break
+ for i in range(len(list)):
+ if list[i] = item:
+ del list[i]
+ break
# Return a string containing a file's contents.
#
def readfile(fn):
- return readopenfile(open(fn, 'r'))
+ return readopenfile(open(fn, 'r'))
# Read an open file until EOF.
#
def readopenfile(fp):
- BUFSIZE = 512*8
- data = ''
- while 1:
- buf = fp.read(BUFSIZE)
- if not buf: break
- data = data + buf
- return data
+ BUFSIZE = 512*8
+ data = ''
+ while 1:
+ buf = fp.read(BUFSIZE)
+ if not buf: break
+ data = data + buf
+ return data