From: Jack Jansen Date: Tue, 6 Mar 2001 22:43:06 +0000 (+0000) Subject: Re-try the file copy once if it fails. This works around an obscure and non-reproduci... X-Git-Tag: v2.1b2~212 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36bcf9b94f8cbec99881f07225f4c682a7fecbe2;p=python Re-try the file copy once if it fails. This works around an obscure and non-reproducibe bug in GUSI. --- diff --git a/Mac/scripts/MkDistr.py b/Mac/scripts/MkDistr.py index f446b343c5..3e2ee27f0e 100644 --- a/Mac/scripts/MkDistr.py +++ b/Mac/scripts/MkDistr.py @@ -292,9 +292,15 @@ class Main: try: macostools.copy(fullname, os.path.join(destprefix, dest), 1) except: #DBG - print 'cwd', os.getcwd() #DBG - print 'fsspec', macfs.FSSpec(fullname) #DBG - raise + print '*** Copy failed mysteriously, try again' + print '*** cwd', os.getcwd() #DBG + print '*** fsspec', macfs.FSSpec(fullname) #DBG + # Get rid of open files + try: + i = 1 / 0 + except: + pass + macostools.copy(fullname, os.path.join(destprefix, dest), 1) for d in todo: if not self.rundir(d, destprefix, doit): rv = 0