gimp-help-2 r2552 - in branches/xml2po-support: . src tools
- From: romanofski svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp-help-2 r2552 - in branches/xml2po-support: . src tools
- Date: Fri, 5 Sep 2008 10:48:35 +0000 (UTC)
Author: romanofski
Date: Fri Sep 5 10:48:35 2008
New Revision: 2552
URL: http://svn.gnome.org/viewvc/gimp-help-2?rev=2552&view=rev
Log:
2008-09-05 Roman Joost <romanofski gimp org>
* src/*: removed. The oldsrc need to be renamed to 'src',
otherwise it isn't possible to do a svn merge with the TRUNK
content
* tools/split-xml-multi-lang.py: made the profiling optional if
no profile module can be found in the current python setup
Removed:
branches/xml2po-support/src/
Modified:
branches/xml2po-support/ChangeLog
branches/xml2po-support/tools/split-xml-multi-lang.py
Modified: branches/xml2po-support/tools/split-xml-multi-lang.py
==============================================================================
--- branches/xml2po-support/tools/split-xml-multi-lang.py (original)
+++ branches/xml2po-support/tools/split-xml-multi-lang.py Fri Sep 5 10:48:35 2008
@@ -30,7 +30,11 @@
import re
import xml.dom.minidom
import logging
-import profile
+try:
+ import profile
+ WITH_PROFILING = True
+except ImportError:
+ WITH_PROFILING = False
# Configure logging package
logging.basicConfig(level=logging.INFO, format="%(levelname)-8s %(message)s")
@@ -479,8 +483,12 @@
# Main program start
if __name__ == '__main__':
- if "--profile" in sys.argv:
+ if "--profile" in sys.argv and WITH_PROFILING == True:
profile.run("main()")
+ elif "--profile" in sys.argv and WITH_PROFILING == False:
+ print ("Can't find profiling support."
+ " Install profiling support for python.")
+ sys.exit(2)
else:
main()
# pydoc doesn't like the following "raise" statement
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]