[or-cvs] r24075: {arm} Another hotfix from Fabian (for decimal seconds in the uptim (in arm/release: . src src/util)

Damian Johnson atagar1 at gmail.com
Thu Jan 13 03:11:37 UTC 2011


Author: atagar
Date: 2011-01-13 03:11:36 +0000 (Thu, 13 Jan 2011)
New Revision: 24075

Modified:
   arm/release/
   arm/release/src/util/uiTools.py
   arm/release/src/version.py
Log:
Another hotfix from Fabian (for decimal seconds in the uptime field of ps results)




Property changes on: arm/release
___________________________________________________________________
Modified: svn:mergeinfo
   - /arm/trunk:22227-24063
   + /arm/trunk:22227-24074

Modified: arm/release/src/util/uiTools.py
===================================================================
--- arm/release/src/util/uiTools.py	2011-01-13 03:06:37 UTC (rev 24074)
+++ arm/release/src/util/uiTools.py	2011-01-13 03:11:36 UTC (rev 24075)
@@ -333,7 +333,7 @@
   """
   Provides the number of seconds corresponding to the formatting used for the
   cputime and etime fields of ps:
-  [[dd-]hh:]mm:ss or hh:mm.ss
+  [[dd-]hh:]mm:ss or mm:ss.ss
   
   If the input entry is malformed then this raises a ValueError.
   
@@ -349,14 +349,12 @@
     days = int(timeEntry[:dateDivider])
     timeEntry = timeEntry[dateDivider+1:]
   
-  # normalise the seconds delimiter
-  timeEntry = timeEntry.replace(".", ":")
-  
   timeComp = timeEntry.split(":")
   if len(timeComp) == 3:
     hours, minutes, seconds = timeComp
   elif len(timeComp) == 2:
     minutes, seconds = timeComp
+    seconds = round(float(seconds))
   else:
     raise ValueError(errorMsg)
   

Modified: arm/release/src/version.py
===================================================================
--- arm/release/src/version.py	2011-01-13 03:06:37 UTC (rev 24074)
+++ arm/release/src/version.py	2011-01-13 03:11:36 UTC (rev 24075)
@@ -2,6 +2,6 @@
 Provides arm's version and release date.
 """
 
-VERSION = '1.4.1.1'
-LAST_MODIFIED = "January 11, 2011"
+VERSION = '1.4.1.2'
+LAST_MODIFIED = "January 12, 2011"
 



More information about the tor-commits mailing list