[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Stable update for python-support



Hi,

I have prepared a python-support update targeted at the next lenny point
release.

   * update-python-modules (create_dotpath):
     + Completely ignore lines starting with "import", as they would be
       executed by python upon startup.

It is just a backport of this change which was made for 0.8.6, which
fixes a very annoying bug triggered by some packages using some
completely brain-dead functionality of .pth files.

--- deb-maint/python-support/trunk/update-python-modules	2009/05/05 17:04:53	12975
+++ deb-maint/python-support/trunk/update-python-modules	2009/05/05 17:05:11	12976
@@ -186,6 +186,9 @@
     if f.endswith(".pth") and os.path.isfile(f):
       for l in file(f):
         l=l.rstrip('\n')
+        if l.startswith('import'):
+          # Do not ship lines starting with "import", they are executed! (complete WTF)
+          continue
         pathlist.append(l)
         l2=os.path.join(path,l)
         pathlist.append(l2)

-- 
 .''`.      Josselin Mouette
: :' :
`. `'   “I recommend you to learn English in hope that you in
  `-     future understand things”  -- Jörg Schilling

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=


Reply to: