[PATCH] D74548: [debuginfo-tests][Dexter] Downgrade failure to delete working dir to warning not error

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 13 06:35:29 PST 2020


jmorse updated this revision to Diff 244418.
jmorse added a comment.

Sounds good, how's this?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74548/new/

https://reviews.llvm.org/D74548

Files:
  debuginfo-tests/dexter/dex/utils/WorkingDirectory.py


Index: debuginfo-tests/dexter/dex/utils/WorkingDirectory.py
===================================================================
--- debuginfo-tests/dexter/dex/utils/WorkingDirectory.py
+++ debuginfo-tests/dexter/dex/utils/WorkingDirectory.py
@@ -12,7 +12,7 @@
 import time
 
 from dex.utils.Exceptions import Error
-
+from dex.utils.Warning import warn
 
 class WorkingDirectory(object):
     def __init__(self, context, *args, **kwargs):
@@ -40,7 +40,8 @@
             try:
                 shutil.rmtree(self.path)
                 return
-            except OSError as e:
-                exception = e
+            except OSError:
                 time.sleep(0.1)
-        raise Error(exception)
+
+        warn(self.context, '"{}" left in place (couldn\'t delete)\n'.format(self.path))
+        return


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74548.244418.patch
Type: text/x-patch
Size: 807 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200213/2138872f/attachment.bin>


More information about the llvm-commits mailing list