Mercurial > hg
changeset 51939:8d9767bf4adb
debugantivirusrunning: use bytes when opening a vfs file
I noticed this when searching for "base85" to see if anything else in the
previous commit needed to be annotated. This was added in 87047efbc6a6, after
the mass byteification in 687b865b95ad.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 04 Oct 2024 23:23:24 -0400 |
parents | fa7059f031a9 |
children | 54d9f496f07a |
files | mercurial/debugcommands.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/debugcommands.py Fri Oct 04 23:21:41 2024 -0400 +++ b/mercurial/debugcommands.py Fri Oct 04 23:23:24 2024 -0400 @@ -143,7 +143,7 @@ @command(b'debugantivirusrunning', []) def debugantivirusrunning(ui, repo): """attempt to trigger an antivirus scanner to see if one is active""" - with repo.cachevfs.open('eicar-test-file.com', b'wb') as f: + with repo.cachevfs.open(b'eicar-test-file.com', b'wb') as f: f.write( util.b85decode( # This is a base85-armored version of the EICAR test file. See @@ -154,7 +154,7 @@ ) # Give an AV engine time to scan the file. time.sleep(2) - util.unlink(repo.cachevfs.join('eicar-test-file.com')) + util.unlink(repo.cachevfs.join(b'eicar-test-file.com')) @command(b'debugapplystreamclonebundle', [], b'FILE')