Deutsch   English   Français   Italiano  
<mock-20241024151020@ram.dialup.fu-berlin.de>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: Re: shutil.rmtree() fails when used in Fedora (rpm) "mock" environment
Date: 24 Oct 2024 14:27:32 GMT
Organization: Stefan Ram
Lines: 14
Expires: 1 Jul 2025 11:59:58 GMT
Message-ID: <mock-20241024151020@ram.dialup.fu-berlin.de>
References: <mailman.32.1729778643.4695.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de Aex1bwmtoK6BsbN5XQh5lAsFWHufBTNKLU/DXvL7x6EX/x
Cancel-Lock: sha1:5KWC7Rsula9GNdgoOy/5Z/otyTg= sha256:RZPBTtdFSRoBTHPLVLY0l8TLo7immQpnh8E4dvmK0vs=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
	Distribution through any means other than regular usenet
	channels is forbidden. It is forbidden to publish this
	article in the Web, to change URIs of this article into links,
        and to transfer the body without this notice, but quotations
        of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
	services to mirror the article in the web. But the article may
	be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
Bytes: 1958

c.buhtz@posteo.jp wrote or quoted:
>Maybe you have an idea what is the intention behind this error raised by 
>an "assert" statement inside "shutil.rmtree()".

  Instead of banking on TemporaryDirectory's auto-cleanup, you
  might wanna take a stab at nuking the directory post-test with
  a more bare-bones approach like os.rmdir() or roll your own
  cleanup function.

  Or you could wrap the TemporaryDirectory usage in a try-except
  block to catch and log any hiccups during cleanup, so the
  test can keep truckin' even if that cleanup goes sideways