From a1c1d1357f029cc82048b22f2a73fd7607b5e501 Mon Sep 17 00:00:00 2001 From: niphlod Date: Tue, 4 Oct 2016 00:30:11 +0200 Subject: [PATCH] remove __pycache__ from the list of apps in case someone wonders how many core devs are actively using the admin app...here's the evidence ^_^' --- applications/admin/controllers/default.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/applications/admin/controllers/default.py b/applications/admin/controllers/default.py index b7831e58..e9560edf 100644 --- a/applications/admin/controllers/default.py +++ b/applications/admin/controllers/default.py @@ -310,12 +310,13 @@ def site(): regex = re.compile('^\w+$') if is_manager(): - apps = [f for f in os.listdir(apath(r=request)) if regex.match(f)] + apps = [a for a in os.listdir(apath(r=request)) if regex.match(f) and + a != '__pycache__'] else: - apps = [f.name for f in db(db.app.owner == auth.user_id).select()] + apps = [a.name for a in db(db.app.owner == auth.user_id).select()] if FILTER_APPS: - apps = [f for f in apps if f in FILTER_APPS] + apps = [a for a in apps if a in FILTER_APPS] apps = sorted(apps, key=lambda a: a.upper()) myplatform = platform.python_version()