xce009 commited on
Commit
5c8183d
·
1 Parent(s): d02a73b

fix: add missing os import to system.py

Browse files
Files changed (2) hide show
  1. app/api/v1/system.py +1 -1
  2. deploy.py +1 -1
app/api/v1/system.py CHANGED
@@ -1,6 +1,7 @@
1
  from __future__ import annotations
2
 
3
  import io
 
4
  import platform
5
  import tarfile
6
  import time
@@ -39,7 +40,6 @@ _logger = get_logger(__name__)
39
  _MAINTENANCE_MODE: bool = False
40
 
41
 
42
-
43
  def is_maintenance() -> bool:
44
  return _MAINTENANCE_MODE or os.environ.get("APP_UNDER_MAINTENANCE", "").lower() in ("1", "true", "yes")
45
 
 
1
  from __future__ import annotations
2
 
3
  import io
4
+ import os
5
  import platform
6
  import tarfile
7
  import time
 
40
  _MAINTENANCE_MODE: bool = False
41
 
42
 
 
43
  def is_maintenance() -> bool:
44
  return _MAINTENANCE_MODE or os.environ.get("APP_UNDER_MAINTENANCE", "").lower() in ("1", "true", "yes")
45
 
deploy.py CHANGED
@@ -589,7 +589,7 @@ def run_deployment(args: argparse.Namespace, env: dict[str, str]) -> int:
589
  maint_enabled = False
590
  try:
591
  status = http_post_json(maint_url, auth_headers, timeout=15)
592
- if status and status == 200:
593
  maint_enabled = True
594
  print(f" {_OK_ICON} Maintenance enabled — writes blocked")
595
  except Exception:
 
589
  maint_enabled = False
590
  try:
591
  status = http_post_json(maint_url, auth_headers, timeout=15)
592
+ if status == 200:
593
  maint_enabled = True
594
  print(f" {_OK_ICON} Maintenance enabled — writes blocked")
595
  except Exception: