From d9ec8413744faaba3543bff9773bdad9786260ab Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 16 Apr 2008 18:25:51 +0200 Subject: Added stuff from laptop --- .../files/gtk-threading-filename-guessing.patch | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 dev-python/lxml/files/gtk-threading-filename-guessing.patch (limited to 'dev-python/lxml/files/gtk-threading-filename-guessing.patch') diff --git a/dev-python/lxml/files/gtk-threading-filename-guessing.patch b/dev-python/lxml/files/gtk-threading-filename-guessing.patch new file mode 100644 index 0000000..a48f258 --- /dev/null +++ b/dev-python/lxml/files/gtk-threading-filename-guessing.patch @@ -0,0 +1,35 @@ +=== src/lxml/apihelpers.pxi +================================================================== +--- src/lxml/apihelpers.pxi (revision 3804) ++++ src/lxml/apihelpers.pxi (revision 3805) +@@ -1107,20 +1107,16 @@ + Returns None if not a file object. + """ + # file instances have a name attribute +- try: +- return source.name +- except AttributeError: +- pass ++ filename = getattr3(source, 'name', None) ++ if filename is not None: ++ return filename + # gzip file instances have a filename attribute +- try: +- return source.filename +- except AttributeError: +- pass ++ filename = getattr3(source, 'filename', None) ++ if filename is not None: ++ return filename + # urllib2 provides a geturl() method +- try: +- geturl = source.geturl +- except AttributeError: +- # can't determine filename +- return None +- else: ++ geturl = getattr3(source, 'geturl', None) ++ if geturl is not None: + return geturl() ++ # can't determine filename ++ return None -- cgit v1.2.3-70-g09d2