mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-15 20:57:56 +08:00
create annotations output dir if it does not exist (#1062)
* create annotations output dir if it doees not exist * lint
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import errno
|
||||
import functools
|
||||
import logging
|
||||
from os import devnull
|
||||
from os import devnull, mkdir
|
||||
from os.path import splitext, basename, isdir
|
||||
import sys
|
||||
import warnings
|
||||
@@ -298,8 +298,11 @@ def launch(
|
||||
raise click.FileError(basename(experimental_annotations_file), hint="annotation file type must be .csv")
|
||||
|
||||
if experimental_annotations_output_dir is not None and not isdir(experimental_annotations_output_dir):
|
||||
raise click.ClickException('--experimental-annotations-output-dir must specify an existing directory. '
|
||||
f'"{experimental_annotations_output_dir}" does not exist.')
|
||||
try:
|
||||
mkdir(experimental_annotations_output_dir)
|
||||
except OSError:
|
||||
raise click.ClickException("Unable to create directory specified by "
|
||||
"--experimental-annotations-output-dir")
|
||||
|
||||
if about:
|
||||
def url_check(url):
|
||||
|
||||
Reference in New Issue
Block a user