Hi,

I just stepped over hook-xml crashing with 'bad marshal data', because site-packages/_xmlplus/__init__.py is read instead of .pyc.

IMHO the text for the filename is plain wrong.

Can anybody please verify this patch is correct:

===================================================================
--- PyInstaller/hooks/hook-xml.py       (Revision 1649)
+++ PyInstaller/hooks/hook-xml.py       (Arbeitskopie)
@@ -27,7 +27,7 @@
     txt = exec_statement("import xml;print xml.__file__")

     if txt.find('_xmlplus') > -1:
-        if txt[:-3] == ".py":
+        if txt.endswith(".py"):
             txt = txt + 'c'
         co = marshal.loads(open(txt, 'rb').read()[8:])
         old_pth = mod.__path__[:]


--
Schönen Gruß - Regards
Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult
Spezialist für IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/
Goebel Consult ist Mitglied bei http://www.7-it.de

--
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Reply via email to