Update of /cvsroot/spambayes/spambayes/spambayes/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2853/spambayes/test

Modified Files:
        test_sb_filter.py 
Log Message:
Add Python 2.2 compat.

Index: test_sb_filter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/test/test_sb_filter.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_sb_filter.py   22 Nov 2004 00:22:55 -0000      1.1
--- test_sb_filter.py   20 Jan 2005 03:41:39 -0000      1.2
***************
*** 24,27 ****
--- 24,33 ----
  spam1 = email.message_from_string(spam1)
  
+ try:
+     __file__
+ except NameError:
+     # Python 2.2
+     __file__ = os.path.abspath(sys.argv[0])
+ 
  TEMP_DBM_NAME = os.path.join(os.path.dirname(__file__), "temp.dbm")
  # The chances of anyone having a file with this name in the test

_______________________________________________
Spambayes-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/spambayes-checkins

Reply via email to