On 26-mei-2005, at 16:54, Jonathan Wight wrote:
After adding Gideon's suggestion for CRLF ending file. My importer is failing on only 8 files out of 3084 files. All the failures are with Python files that try to generate the __version__ attribute with code instead, e.g.: __version__ = string.split('$Revision: 1.8 $')[1] __version__ = '$Revision: 1.6 $'[11:-2] And so on. My options are: #1 Continue to fail and not process the script any further (easiest solution ;-) #2 Just ignore the attribute in question. #3 Convert the attribute into a string even though it might not make much sense. #4 Execute the line and get the computed value of the attribute. I don't really want to execute the line - who the heck knows what it could do. Unless anyone has any better ideas I'm just going to try and gracefully ignore the attribute.
You could try to recognize some forms of safe python code and execute those.
I'd expect that the lines you mention above would be the majority of computed __version__ attributes.
Jon. On May 26, 2005, at 09:37, Nicholas Riley wrote:On Thu, May 26, 2005 at 12:13:02AM -0400, Jonathan Wight wrote:Just to let everyone know that my Python Metadata Importer plug-in was released the other day. http://toxicsoftware.com/blog/index.php/weblog/ python_metadata_importer_101_released/Since I installed this I got a continuous stream of: May 26 08:32:27 byron mdimportserver[29832]: Exception occured: *** -[NSCFArray addObject:]: attempt to insert nil in console.log. I assume this will go away once the import finishes, but it's rather annoying at the moment. -- Nicholas Riley <[EMAIL PROTECTED]> | <http://www.uiuc.edu/ph/www/ njriley> _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig