2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-09 00:21:23 +00:00

chore: Drop dead code

tx [vulture](https://pypi.org/project/vulture/)
This commit is contained in:
Gavin D'souza 2022-06-14 15:48:56 +05:30
parent 4fcda9ae22
commit 21eceae6ac
2 changed files with 0 additions and 28 deletions

View File

@ -13,8 +13,6 @@ from datetime import date
from urllib.parse import urlparse from urllib.parse import urlparse
import os import os
from markupsafe import soft_str
# imports - third party imports # imports - third party imports
import click import click
from git import Repo from git import Repo
@ -285,31 +283,6 @@ def make_resolution_plan(app: App, bench: "Bench"):
return resolution 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="."): def get_excluded_apps(bench_path="."):
try: try:
with open(os.path.join(bench_path, "sites", "excluded_apps.txt")) as f: with open(os.path.join(bench_path, "sites", "excluded_apps.txt")) as f:

View File

@ -2,7 +2,6 @@ import os
import shutil import shutil
import subprocess import subprocess
import unittest import unittest
from tabnanny import check
from bench.app import App from bench.app import App
from bench.bench import Bench from bench.bench import Bench