[tuxdroid-svn] r4685 - in software_suite_v3/smart-core/smart-server/trunk: content resources/03_co
Status: Beta
Brought to you by:
ks156
|
From: remi <c2m...@c2...> - 2009-05-27 09:26:19
|
Author: remi
Date: 2009-05-27 11:26:05 +0200 (Wed, 27 May 2009)
New Revision: 4685
Added:
software_suite_v3/smart-core/smart-server/trunk/content/attitunes/
Modified:
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/00_resourceAttituneManager.py
software_suite_v3/smart-core/smart-server/trunk/util/attitunes/AttitunesContainer.py
Log:
* added a directory in the server for the attitunes
* updated the attitune manager to check this directory
Modified: software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/00_resourceAttituneManager.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/00_resourceAttituneManager.py 2009-05-27 08:33:42 UTC (rev 4684)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/00_resourceAttituneManager.py 2009-05-27 09:26:05 UTC (rev 4685)
@@ -59,6 +59,14 @@
self.logger.logInfo("Tux Droid Attitune Manager")
self.logger.logInfo("Licence : GPL")
self.logger.logInfo("-----------------------------------------------")
+ # Get the attitunes path
+ attitunesPath = os.path.join(TDS_APPLICATION_PATH, "content", "attitunes")
+ self.logger.logInfo("Add directory in the container [%s]." %\
+ attitunesPath)
+ self.__attitunesContainer.addDirectory(attitunesPath)
+ self.logger.logInfo("Deploy the attitunes container.")
+ self.__attitunesContainer.deploy()
+ self.logger.logInfo("Attitunes container is deployed.")
def stop(self):
self.logger.logInfo("Undeploy the attitunes container")
@@ -196,6 +204,7 @@
except:
result = False
filesCacheManager.destroyFileCache(cFile)
+ self.__attitunesContainer.check()
return result
def removeAttituneFromContainer(self, attituneName):
@@ -211,6 +220,7 @@
attFile = attitune.getAttFile()
# Remove the att file
DirectoriesAndFilesTools.RMFile(attFile)
+ self.__attitunesContainer.check()
return True
return False
Modified: software_suite_v3/smart-core/smart-server/trunk/util/attitunes/AttitunesContainer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/attitunes/AttitunesContainer.py 2009-05-27 08:33:42 UTC (rev 4684)
+++ software_suite_v3/smart-core/smart-server/trunk/util/attitunes/AttitunesContainer.py 2009-05-27 09:26:05 UTC (rev 4685)
@@ -71,7 +71,7 @@
def deploy(self):
"""Deploy the setted attitunes directories.
"""
- self.__autoDeployer.deploy()
+ self.__autoDeployer.deploy(False)
# --------------------------------------------------------------------------
# Undeploy the setted attitunes directories.
@@ -82,6 +82,14 @@
self.__autoDeployer.undeploy()
# --------------------------------------------------------------------------
+ # Check the attitunes directories manually.
+ # --------------------------------------------------------------------------
+ def check(self):
+ """Check the attitunes directories manually.
+ """
+ self.__autoDeployer.check()
+
+ # --------------------------------------------------------------------------
# Get if the container is deployed or not.
# --------------------------------------------------------------------------
def isDeployed(self):
|