[tuxdroid-svn] r5180 - in software_suite_v3/smart-core/smart-server/trunk: . util/applicationserve
Status: Beta
Brought to you by:
ks156
|
From: remi <c2m...@c2...> - 2009-07-28 08:32:03
|
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):
|