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

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

Index: test_sb_dbexpimp.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/test/test_sb_dbexpimp.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_sb_dbexpimp.py 22 Nov 2004 00:22:54 -0000      1.3
--- test_sb_dbexpimp.py 20 Jan 2005 03:39:28 -0000      1.4
***************
*** 21,24 ****
--- 21,30 ----
  from test_sb_server import good1, spam1
  
+ try:
+     __file__
+ except NameError:
+     # Python 2.2
+     __file__ = os.path.abspath(sys.argv[0])
+ 
  TEMP_PICKLE_NAME = os.path.join(os.path.dirname(__file__), "temp.pik")
  TEMP_CSV_NAME = os.path.join(os.path.dirname(__file__), "temp.csv")

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

Reply via email to