Skip to content

Commit

Permalink
fixup restructured files
Browse files Browse the repository at this point in the history
  • Loading branch information
GloriousEggroll committed Feb 27, 2024
1 parent 2ef647a commit e12964f
Show file tree
Hide file tree
Showing 13 changed files with 1,211 additions and 3,802 deletions.
File renamed without changes.
2 changes: 2 additions & 0 deletions ULWGL/ulwgl_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

DEBUG_FORMAT = "%(levelname)s [%(module)s.%(funcName)s:%(lineno)s]:%(message)s"

CONFIG = "ULWGL_VERSION.json"


class Level(Enum):
"""Represent the Log level values for the logger module."""
Expand Down
15 changes: 13 additions & 2 deletions ULWGL/ulwgl_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from subprocess import run
from ulwgl_dl_util import get_ulwgl_proton
from ulwgl_consts import Level
from ulwgl_util import msg
from ulwgl_util import msg, setup_ulwgl
from ulwgl_log import log, console_handler, debug_formatter
from ulwgl_util import UnixUser

Expand Down Expand Up @@ -313,12 +313,20 @@ def main() -> int: # noqa: D103
"ULWGL_ID": "",
}
command: List[str] = []
args: Union[Namespace, Tuple[str, List[str]]] = parse_args()
opts: List[str] = None
# Expected files in this dir: pressure vessel, launcher files, runtime platform, runner, config
# root: Path = Path("/usr/share/ULWGL")
root: Path = Path(__file__).parent
# Expects this dir to be in sync with root
# On update, files will be selectively updated
local: Path = Path.home().joinpath(".local/share/ULWGL")
args: Union[Namespace, Tuple[str, List[str]]] = parse_args()

if "ULWGL_LOG" in os.environ:
set_log()

setup_ulwgl(root, local)

if isinstance(args, Namespace) and getattr(args, "config", None):
set_env_toml(env, args)
else:
Expand Down Expand Up @@ -353,3 +361,6 @@ def main() -> int: # noqa: D103
except Exception as e: # noqa: BLE001
print_exception(e)
sys.exit(1)
finally:
# Cleanup .ref file on every exit
Path.home().joinpath(".local/share/ULWGL/.ref").unlink(missing_ok=True)
Loading

0 comments on commit e12964f

Please sign in to comment.