"formats" is undefined.
Signed-off-by: Michael J Gruber <[email protected]>
---
In fact, the version in r3201 also leaves an open file handle around which
is not used later on (the seek() is superfluous).
We cannot reuse it in PSwriter() since that may be called more than once,
but closes the handle.
With the current design of filelocator (returning fd's), I think there are only
two possibilities:
* Multiple filelocator calls (like in my submission). This closes fds properly.
I may have missed a close(), though: linefilereader.close() is defined but
never
used (neither before nor after these patches).
* Store the fd in self.file and don't close it.
At least with r3201+this fix (or the original submission) it works. But we
should
probably close instead of seek after _readbb.
---
pyx/epsfile.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pyx/epsfile.py b/pyx/epsfile.py
index 65793ee..6d2731e 100644
--- a/pyx/epsfile.py
+++ b/pyx/epsfile.py
@@ -248,7 +248,7 @@ class epsfile(canvasitem.canvasitem):
self.filename = filename
self.kpsearch = kpsearch
if kpsearch:
- self.file = filelocator.open(filename, formats, "rb")
+ self.file = filelocator.open(filename, [filelocator.format.pict],
"rb")
else:
self.file = open(filename, "rb")
if bbox:
--
1.7.6.336.gdf067
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
PyX-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-devel