File tree Expand file tree Collapse file tree 1 file changed +19
-10
lines changed
Expand file tree Collapse file tree 1 file changed +19
-10
lines changed Original file line number Diff line number Diff line change 2121from synapseclient .core .async_utils import wrap_async_to_sync
2222from synapseclient .core .logging_setup import DEFAULT_LOGGER_NAME , SILENT_LOGGER_NAME
2323from synapseclient .models import Project as Project_Model
24- from synapseclient .models import SubmissionView , Team
24+ from synapseclient .models import (
25+ SubmissionView ,
26+ Team ,
27+ WikiHeader ,
28+ WikiHistorySnapshot ,
29+ WikiOrderHint ,
30+ WikiPage ,
31+ )
2532
2633tracer = trace .get_tracer ("synapseclient" )
2734working_directory = tempfile .mkdtemp (prefix = "someTestFolder" )
@@ -174,15 +181,17 @@ async def _cleanup(syn: Synapse, items):
174181 os .remove (item )
175182 except Exception as ex :
176183 print (ex )
177- elif isinstance (item , Team ):
178- try :
179- await item .delete_async (synapse_client = syn )
180- except Exception as ex :
181- if hasattr (ex , "response" ) and ex .response .status_code in [404 , 403 ]:
182- pass
183- else :
184- print ("Error cleaning up entity: " + str (ex ))
185- elif isinstance (item , SubmissionView ):
184+ elif isinstance (
185+ item ,
186+ (
187+ Team ,
188+ SubmissionView ,
189+ WikiPage ,
190+ WikiHistorySnapshot ,
191+ WikiHeader ,
192+ WikiOrderHint ,
193+ ),
194+ ):
186195 try :
187196 await item .delete_async (synapse_client = syn )
188197 except Exception as ex :
You can’t perform that action at this time.
0 commit comments