mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-21 15:36:18 -05:00
Clarifying errors.
This commit is contained in:
parent
a1fe650d0c
commit
d411221412
3 changed files with 6 additions and 7 deletions
|
|
@ -1122,8 +1122,7 @@ export const useUploadFile = () => {
|
|||
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const file = files[i];
|
||||
console.log(`Starting file upload`);
|
||||
console.log(file);
|
||||
console.log(`Uploading file:`, file.path);
|
||||
|
||||
const chunkNum = 0;
|
||||
const chunkSize = 10 * 1024 * 1024; // 10MB
|
||||
|
|
|
|||
|
|
@ -1376,7 +1376,7 @@ def delete_directory(directory: pathlib.Path, recursive: bool = False):
|
|||
.join(TagFile, TagFile.file_group_id == FileGroup.id) \
|
||||
.limit(1).one_or_none()
|
||||
if tagged:
|
||||
raise FileGroupIsTagged()
|
||||
raise FileGroupIsTagged(f'Cannot delete {tagged} because it is tagged')
|
||||
shutil.rmtree(directory)
|
||||
else:
|
||||
directory.rmdir()
|
||||
|
|
|
|||
|
|
@ -311,8 +311,8 @@ echo "standard error" >&2
|
|||
'''
|
||||
|
||||
BAD_SCRIPT = '''#! /usr/bin/env bash
|
||||
echo "new standard output"
|
||||
echo "new standard error" >&2
|
||||
echo "bad standard output"
|
||||
echo "bad standard error" >&2
|
||||
exit 123
|
||||
'''
|
||||
|
||||
|
|
@ -345,8 +345,8 @@ async def test_process_runner_output(async_client, test_directory, test_download
|
|||
timeout=1
|
||||
)
|
||||
assert return_code == 123
|
||||
assert logs['stdout'] == b'new standard output\n'
|
||||
assert logs['stderr'] == b'new standard error\n'
|
||||
assert logs['stdout'] == b'bad standard output\n'
|
||||
assert logs['stderr'] == b'bad standard error\n'
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue