Bug#588348: offlineimap: Looses mails if PYTHONOPTIMIZE is set

2010-07-11 Thread Jakub Wilk

tags 588348 + patch
thanks

* Sascha Silbe sascha-debian-bugs-offlineimap-2010-07...@silbe.org, 
2010-07-07, 12:17:

offlineimap calls critical code paths only via assert.


I attach an ugly, untested work-around for this bug.

--
Jakub Wilk
diff -Nru offlineimap-6.2.0.2/bin/offlineimap offlineimap-6.2.0.3/bin/offlineimap
--- offlineimap-6.2.0.2/bin/offlineimap	2009-08-12 22:25:27.0 +0200
+++ offlineimap-6.2.0.3/bin/offlineimap	2010-07-11 19:14:21.0 +0200
@@ -17,5 +17,16 @@
 #along with this program; if not, write to the Free Software
 #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
+import os
+import sys
+
+try:
+assert 0
+except AssertionError:
+pass
+else:
+os.putenv('PYTHONOPTIMIZE', '')
+os.execv('/usr/bin/python', ['python'] + sys.argv)
+
 from offlineimap import init
 init.startup('6.2.0')
diff -Nru offlineimap-6.2.0.2/offlineimap.py offlineimap-6.2.0.3/offlineimap.py
--- offlineimap-6.2.0.2/offlineimap.py	2009-08-12 22:25:27.0 +0200
+++ offlineimap-6.2.0.3/offlineimap.py	2010-07-11 19:14:23.0 +0200
@@ -17,5 +17,16 @@
 #along with this program; if not, write to the Free Software
 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
+import os
+import sys
+
+try:
+assert 0
+except AssertionError:
+pass
+else:
+os.putenv('PYTHONOPTIMIZE', '')
+os.execv('/usr/bin/python', ['python'] + sys.argv)
+
 from offlineimap import init
 init.startup('6.2.0')


signature.asc
Description: Digital signature


Processed: Re: Bug#588348: offlineimap: Looses mails if PYTHONOPTIMIZE is set

2010-07-11 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 tags 588348 + patch
Bug #588348 [offlineimap] offlineimap: Looses mails if PYTHONOPTIMIZE is set
Added tag(s) patch.
 thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
588348: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588348
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


-- 
To UNSUBSCRIBE, email to debian-qa-packages-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/handler.s.c.127887524413496.transcr...@bugs.debian.org