Author: remi
Date: 2009-07-08 09:26:04 +0200 (Wed, 08 Jul 2009)
New Revision: 5079

Modified:
   software_suite_v3/smart-core/smart-server/trunk/TDSAutoUpdater.py
Log:
* Added class and method headers.

Modified: software_suite_v3/smart-core/smart-server/trunk/TDSAutoUpdater.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/TDSAutoUpdater.py   
2009-07-08 07:20:44 UTC (rev 5078)
+++ software_suite_v3/smart-core/smart-server/trunk/TDSAutoUpdater.py   
2009-07-08 07:26:04 UTC (rev 5079)
@@ -57,13 +57,19 @@
     'smart_server',
 ]
 
+# 
------------------------------------------------------------------------------
+# Tux Droid Server : Auto updater.
+# 
------------------------------------------------------------------------------
 class TDSAutoUpdater(object):
+    """Tux Droid Server : Auto updater.
     """
-    """
 
+    # 
--------------------------------------------------------------------------
+    # Constructor.
+    # 
--------------------------------------------------------------------------
     def __init__(self):
+        """Constructor.
         """
-        """
         if not os.path.isdir(TDS_UPDATES_PATH):
             DirectoriesAndFilesTools.MKDirs(TDS_UPDATES_PATH)
         self.__logger = SimpleLogger("auto_updater.log")
@@ -78,9 +84,12 @@
         # Write default CVER files
         self.__writeDefaultCVerFiles()
 
+    # 
--------------------------------------------------------------------------
+    # Write default cver files if not exists.
+    # 
--------------------------------------------------------------------------
     def __writeDefaultCVerFiles(self):
+        """Write default cver files if not exists.
         """
-        """
         for partName in PART_NAMES:
             defaultVersion = UPDATES_PARTS[partName][PART_DEFAULT_VER]
             cverFile = os.path.join(TDS_UPDATES_PATH,
@@ -88,9 +97,14 @@
             if not os.path.isfile(cverFile):
                 self.__writeCVerFile(partName, defaultVersion)
 
+    # 
--------------------------------------------------------------------------
+    # Write a cver file.
+    # 
--------------------------------------------------------------------------
     def __writeCVerFile(self, partName, currentVersion):
+        """Write a cver file.
+        @param partName: Software part name.
+        @param currentVersion: Current version of the software part.
         """
-        """
         cverFile = os.path.join(TDS_UPDATES_PATH,
             UPDATES_PARTS[partName][PART_CVER_FILE])
         if currentVersion != "":
@@ -98,9 +112,14 @@
             f.write(currentVersion)
             f.close()
 
+    # 
--------------------------------------------------------------------------
+    # Get the current version of a software part.
+    # 
--------------------------------------------------------------------------
     def __getCurrentPartVersion(self, partName):
+        """Get the current version of a software part.
+        @param partName: Software part name.
+        @return: A string.
         """
-        """
         cverFile = os.path.join(TDS_UPDATES_PATH,
             UPDATES_PARTS[partName][PART_CVER_FILE])
         if os.path.isfile(cverFile):
@@ -111,16 +130,22 @@
         else:
             return ""
 
+    # 
--------------------------------------------------------------------------
+    # Start the auto-updater.
+    # 
--------------------------------------------------------------------------
     def start(self):
+        """Start the auto-updater.
         """
-        """
         self.__checkStartInstallers()
         t = threading.Thread(target = self.__updateFromTheNet)
         t.start()
 
+    # 
--------------------------------------------------------------------------
+    # Check / Start the installers.
+    # 
--------------------------------------------------------------------------
     def __checkStartInstallers(self):
+        """Check / Start the installers.
         """
-        """
         for partName in PART_NAMES:
             destConf = os.path.join(TDS_UPDATES_PATH,
                 UPDATES_PARTS[partName][PART_CONF_DEST])
@@ -165,9 +190,12 @@
                 else:
                     pass
 
+    # 
--------------------------------------------------------------------------
+    # Check for updates.
+    # 
--------------------------------------------------------------------------
     def __updateFromTheNet(self):
+        """Check for updates.
         """
-        """
         # Wait for connection to internet enabled
         while not URLTools.URLCheckConnection():
             time.sleep(1.0)


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to