mirror of
https://github.com/frappe/bench.git
synced 2024-11-16 01:57:08 +00:00
parent
4fcda9ae22
commit
21eceae6ac
27
bench/app.py
27
bench/app.py
@ -13,8 +13,6 @@ from datetime import date
|
||||
from urllib.parse import urlparse
|
||||
import os
|
||||
|
||||
from markupsafe import soft_str
|
||||
|
||||
# imports - third party imports
|
||||
import click
|
||||
from git import Repo
|
||||
@ -285,31 +283,6 @@ def make_resolution_plan(app: App, bench: "Bench"):
|
||||
return resolution
|
||||
|
||||
|
||||
def add_to_appstxt(app, bench_path="."):
|
||||
from bench.bench import Bench
|
||||
|
||||
apps = Bench(bench_path).apps
|
||||
|
||||
if app not in apps:
|
||||
apps.append(app)
|
||||
return write_appstxt(apps, bench_path=bench_path)
|
||||
|
||||
|
||||
def remove_from_appstxt(app, bench_path="."):
|
||||
from bench.bench import Bench
|
||||
|
||||
apps = Bench(bench_path).apps
|
||||
|
||||
if app in apps:
|
||||
apps.remove(app)
|
||||
return write_appstxt(apps, bench_path=bench_path)
|
||||
|
||||
|
||||
def write_appstxt(apps, bench_path="."):
|
||||
with open(os.path.join(bench_path, "sites", "apps.txt"), "w") as f:
|
||||
return f.write("\n".join(apps))
|
||||
|
||||
|
||||
def get_excluded_apps(bench_path="."):
|
||||
try:
|
||||
with open(os.path.join(bench_path, "sites", "excluded_apps.txt")) as f:
|
||||
|
@ -2,7 +2,6 @@ import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import unittest
|
||||
from tabnanny import check
|
||||
|
||||
from bench.app import App
|
||||
from bench.bench import Bench
|
||||
|
Loading…
Reference in New Issue
Block a user