[csw-devel] SF.net SVN: gar:[14051] csw/mgar/gar/v2/lib/python/submit_to_newpkgs_test. py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sat Apr 2 14:03:40 CEST 2011


Revision: 14051
          http://gar.svn.sourceforge.net/gar/?rev=14051&view=rev
Author:   wahwah
Date:     2011-04-02 12:03:40 +0000 (Sat, 02 Apr 2011)

Log Message:
-----------
submitpkg-test: Use unittest2 if possible

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/submit_to_newpkgs_test.py

Modified: csw/mgar/gar/v2/lib/python/submit_to_newpkgs_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/submit_to_newpkgs_test.py	2011-04-02 12:03:02 UTC (rev 14050)
+++ csw/mgar/gar/v2/lib/python/submit_to_newpkgs_test.py	2011-04-02 12:03:40 UTC (rev 14051)
@@ -1,6 +1,11 @@
 #!/usr/bin/env python2.6
 
-import unittest
+# Try to use unittest2, fall back to unittest
+try:
+  import unittest2 as unittest
+except ImportError:
+  import unittest
+
 import submit_to_newpkgs as stn
 import tag
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list