move umask to init/__config__
This commit is contained in:
parent
1b944303d0
commit
b854884c56
2 changed files with 2 additions and 2 deletions
|
@ -864,3 +864,5 @@ def setup_django(out_dir: str=None, check_db=False, config: ConfigDict=CONFIG) -
|
|||
f'No database file {SQL_INDEX_FILENAME} found in OUTPUT_DIR: {config["OUTPUT_DIR"]}')
|
||||
except KeyboardInterrupt:
|
||||
raise SystemExit(2)
|
||||
|
||||
os.umask(0o777 - int(OUTPUT_PERMISSIONS, base=8))
|
||||
|
|
|
@ -87,7 +87,6 @@ from .config import (
|
|||
CONFIG,
|
||||
USER_CONFIG,
|
||||
get_real_name,
|
||||
OUTPUT_PERMISSIONS
|
||||
)
|
||||
from .logging_util import (
|
||||
TERM_WIDTH,
|
||||
|
@ -241,7 +240,6 @@ def run(subcommand: str,
|
|||
@enforce_types
|
||||
def init(force: bool=False, out_dir: str=OUTPUT_DIR) -> None:
|
||||
"""Initialize a new ArchiveBox collection in the current directory"""
|
||||
os.umask(0o777 - int(OUTPUT_PERMISSIONS, base=8))
|
||||
os.makedirs(out_dir, exist_ok=True)
|
||||
is_empty = not len(set(os.listdir(out_dir)) - ALLOWED_IN_OUTPUT_DIR)
|
||||
existing_index = os.path.exists(os.path.join(out_dir, JSON_INDEX_FILENAME))
|
||||
|
|
Loading…
Reference in a new issue