Author: remi
Date: 2009-07-28 10:31:54 +0200 (Tue, 28 Jul 2009)
New Revision: 5180
Modified:
software_suite_v3/smart-core/smart-server/trunk/TDSConfiguration.py
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginsContainer.py
Log:
* Added an environment variable in the server configuration to avoid the
platform check of the plugins. (Needed for the Online gadgets data generation)
Modified: software_suite_v3/smart-core/smart-server/trunk/TDSConfiguration.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/TDSConfiguration.py
2009-07-28 08:04:20 UTC (rev 5179)
+++ software_suite_v3/smart-core/smart-server/trunk/TDSConfiguration.py
2009-07-28 08:31:54 UTC (rev 5180)
@@ -104,3 +104,8 @@
# Resources configuration
#
------------------------------------------------------------------------------
TDS_ONLY_BASE_RESOURCES = False
+
+#
------------------------------------------------------------------------------
+# Misc configurations
+#
------------------------------------------------------------------------------
+os.environ["TDS_PLUGIN_PLATFORM_ALL"] = "True"
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginsContainer.py
===================================================================
---
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginsContainer.py
2009-07-28 08:04:20 UTC (rev 5179)
+++
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/PluginsContainer.py
2009-07-28 08:31:54 UTC (rev 5180)
@@ -324,6 +324,18 @@
#
==========================================================================
#
--------------------------------------------------------------------------
+ # Get if the plugins platform must be checked or not.
+ #
--------------------------------------------------------------------------
+ def __mustCheckPlatform(self):
+ """Get if the plugins platform must be checked or not.
+ @return: A boolean.
+ """
+ if os.environ.has_key("TDS_PLUGIN_PLATFORM_ALL"):
+ if os.environ["TDS_PLUGIN_PLATFORM_ALL"] == "True":
+ return False
+ return True
+
+ #
--------------------------------------------------------------------------
# Format the last traceback.
#
--------------------------------------------------------------------------
def __formatException(self):
@@ -374,14 +386,15 @@
error = "Error in 'plugin.xml'\n" + self.__formatException()
return None, error
# Check the plugin platform
- pluginPlatform = plugin.getDescription().getPlatform()
- if pluginPlatform != "all":
- if pluginPlatform == "windows":
- if os.name != "nt":
- return None, "Platform"
- else:
- if os.name == "nt":
- return None, "Platform"
+ if self.__mustCheckPlatform():
+ pluginPlatform = plugin.getDescription().getPlatform()
+ if pluginPlatform != "all":
+ if pluginPlatform == "windows":
+ if os.name != "nt":
+ return None, "Platform"
+ else:
+ if os.name == "nt":
+ return None, "Platform"
def getSplitedPluginVersion(thePlugin):
vList = thePlugin.getDescription().getVersion().split(".")
for i, v in enumerate(vList):
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn