diff options
author | Guido van Rossum <guido@python.org> | 1994-08-23 13:29:21 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-08-23 13:29:21 (GMT) |
commit | 9e1e149a5fbb0b24c4f3b7a2cc52e5236a715ee4 (patch) | |
tree | 1bda36c456657a0d794b26e6e6edb454adc99da8 /Lib/irix5 | |
parent | 29e7af07f064431e21958bac29638b21c154208a (diff) | |
download | cpython-9e1e149a5fbb0b24c4f3b7a2cc52e5236a715ee4.zip cpython-9e1e149a5fbb0b24c4f3b7a2cc52e5236a715ee4.tar.gz cpython-9e1e149a5fbb0b24c4f3b7a2cc52e5236a715ee4.tar.bz2 |
* Lib/sgi/flp.py: fix caching bug (always write the whole file to
the cache!)
Diffstat (limited to 'Lib/irix5')
-rwxr-xr-x | Lib/irix5/flp.py | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/Lib/irix5/flp.py b/Lib/irix5/flp.py index bc4a8ab..84c40aa 100755 --- a/Lib/irix5/flp.py +++ b/Lib/irix5/flp.py @@ -23,22 +23,12 @@ error = 'flp.error' # def parse_form(filename, formname): forms = checkcache(filename) - if forms != None: - if forms.has_key(formname): - return forms[formname] - else: - forms = {} - fp = _open_formfile(filename) - nforms = _parse_fd_header(fp) - for i in range(nforms): - form = _parse_fd_form(fp, formname) - if form <> None: - break + if forms is None: + forms = parse_forms(filename) + if forms.has_key(formname): + return forms[formname] else: raise error, 'No such form in fd file' - forms[formname] = form - writecache(filename, forms) - return form # # Externally visible function. Load all forms. |