2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-08 00:04:38 +00:00

fix: Use subscript instead of method for regex

This is another dumb attempt to trigger a release because it doesn't get
triggered without PRs linked or even if they're refactors!
This commit is contained in:
Gavin D'souza 2022-07-30 01:20:24 +05:30
parent 66d41e5c3d
commit e126ff2439

View File

@ -250,7 +250,7 @@ def get_app_name(bench_path: str, folder_name: str) -> str:
if not app_name:
# retrieve app name from setup.py as fallback
with open(setup_py_path, "rb") as f:
app_name = re.search(r'name\s*=\s*[\'"](.*)[\'"]', f.read().decode("utf-8")).group(1)
app_name = re.search(r'name\s*=\s*[\'"](.*)[\'"]', f.read().decode("utf-8"))[1]
if app_name and folder_name != app_name:
os.rename(os.path.join(apps_path, folder_name), os.path.join(apps_path, app_name))