aboutsummaryrefslogtreecommitdiff
path: root/modules/paths.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-03-25 16:05:12 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-03-25 16:05:25 +0300
commit8c801362b43013a628c58f0c1276e076ee48227d (patch)
tree601abc1c2ed5d5129cccb1ef9bff3a17fa265437 /modules/paths.py
parent3ec7e19f2b0ee520972d9c7f481a13f9bc21b9dc (diff)
split commandline args into its own file
make launch.py use the same command line argument parser as the main program
Diffstat (limited to 'modules/paths.py')
-rw-r--r--modules/paths.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/modules/paths.py b/modules/paths.py
index d991cc71..0e1e00e7 100644
--- a/modules/paths.py
+++ b/modules/paths.py
@@ -1,16 +1,9 @@
-import argparse
import os
import sys
-import modules.safe
+from modules.paths_internal import models_path, script_path, data_path, extensions_dir, extensions_builtin_dir
-script_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+import modules.safe
-# Parse the --data-dir flag first so we can use it as a base for our other argument default values
-parser = argparse.ArgumentParser(add_help=False)
-parser.add_argument("--data-dir", type=str, default=os.path.dirname(os.path.dirname(os.path.realpath(__file__))), help="base path where all user data is stored",)
-cmd_opts_pre = parser.parse_known_args()[0]
-data_path = cmd_opts_pre.data_dir
-models_path = os.path.join(data_path, "models")
# data_path = cmd_opts_pre.data
sys.path.insert(0, script_path)