From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gisle Vanem To: location@lists.ipfire.org Subject: Re: Problem in urllib? Date: Thu, 01 Apr 2021 13:06:02 +0200 Message-ID: <2abf9b14-3462-e3f7-c027-a063a023cc3d@gmail.com> In-Reply-To: <5F277E84-CC26-4254-A3C7-E6D650EE8D5E@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2297659665766745944==" List-Id: --===============2297659665766745944== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Michael Tremer wrote: >> Some issue with shutil when overwriting/renaming an existing >> .db-file. But updating w/o a .db-file works fine. >=20 > I cannot exactly decipher why Windows would complain here. We are replacing= the file because we cannot change it when it is open using mmap(). Maybe Win= dows does not allow that? It was Python's fault; 'os.chmod()' with those bits, made the file read-only. When I did this patch: + if sys.platform !=3D "win32": os.chmod(t.name, stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH) it works fine. --=20 --gv --===============2297659665766745944==--