Author: wade
Date: 2006-11-15 17:21:52 -0500 (Wed, 15 Nov 2006)
New Revision: 67955

Modified:
   trunk/release/monobuild/clean-builds.py
   trunk/release/monobuild/www/python/monobuild.py
Log:
monobuild/clean-builds.py:
-don't break on hanging symlinks 
 (clean cron wasn't getting executed on mono.ximian.com, and the disk filled up)

monobuild/www/python/monobuild.py:
-print error when there's an invalid date



Modified: trunk/release/monobuild/clean-builds.py
===================================================================
--- trunk/release/monobuild/clean-builds.py     2006-11-15 22:05:50 UTC (rev 
67954)
+++ trunk/release/monobuild/clean-builds.py     2006-11-15 22:21:52 UTC (rev 
67955)
@@ -48,7 +48,10 @@
 def get_size_of_files(files):
        sum = 0
        for f in files:
-               if os.path.isdir(f):
+               # Skip missing files
+               if not os.path.exists(f):
+                       pass
+               elif os.path.isdir(f):
                        new_files = []
                        for f2 in os.listdir(f):
                                new_files.append(f + os.sep + f2)
@@ -60,11 +63,9 @@
 
 
 def cleanup(files, type):
-       # TODO: see how much space these files take up
-       if type != 'link':
-               size = get_size_of_files(files)
-               print "Total size for %s: %d (MB)" % (type, size / 1024 / 1024)
-               space_summary.append("Total size for %s: %d (MB)" % (type, size 
/ 1024 / 1024))
+       size = get_size_of_files(files)
+       print "Total size for %s: %d (MB)" % (type, size / 1024 / 1024)
+       space_summary.append("Total size for %s: %d (MB)" % (type, size / 1024 
/ 1024))
        for f in files:
                # os.path.exists doesn't check existance of the link, but the 
target
                if os.path.islink(f):
@@ -72,6 +73,8 @@
                        if execute:
                                print "for real..."
                                os.unlink(f)
+                       else:
+                               print
                elif os.path.exists(f):
                        print "Removing (%s) " % type + f,
                        if execute:

Modified: trunk/release/monobuild/www/python/monobuild.py
===================================================================
--- trunk/release/monobuild/www/python/monobuild.py     2006-11-15 22:05:50 UTC 
(rev 67954)
+++ trunk/release/monobuild/www/python/monobuild.py     2006-11-15 22:21:52 UTC 
(rev 67955)
@@ -309,8 +309,11 @@
                                duration = "?"
 
                        # New times based on clients timezone (accurrate?)
-                       tz_start = utils.adjust_for_timezone(timezone_offset, 
values['start'])
-                       tz_finish = utils.adjust_for_timezone(timezone_offset, 
values['finish'])
+                       try:
+                               tz_start = 
utils.adjust_for_timezone(timezone_offset, values['start'])
+                               tz_finish = 
utils.adjust_for_timezone(timezone_offset, values['finish'])
+                       except:
+                               raise `version`
 
                        req.write("""
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to