From 7add4c569116788f398b4b84341225a26d8b5a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Mon, 5 May 2014 20:27:48 +0200 Subject: [PATCH] Portable: Create empty plugins directory. Fixed file permissions. --- extras/openslides_gui/gui.py | 0 extras/win32-portable/prepare_portable.py | 4 ++++ openslides/utils/plugins.py | 8 ++++---- 3 files changed, 8 insertions(+), 4 deletions(-) mode change 100755 => 100644 extras/openslides_gui/gui.py mode change 100755 => 100644 openslides/utils/plugins.py diff --git a/extras/openslides_gui/gui.py b/extras/openslides_gui/gui.py old mode 100755 new mode 100644 diff --git a/extras/win32-portable/prepare_portable.py b/extras/win32-portable/prepare_portable.py index e2ff38929..7f3be92d1 100755 --- a/extras/win32-portable/prepare_portable.py +++ b/extras/win32-portable/prepare_portable.py @@ -510,6 +510,10 @@ def main(): os.path.join(odir, "packages-info")) write_package_info_content(os.path.join(odir, 'packages-info', 'PACKAGES.txt')) + # Create empty plugins directory + plugindir = os.path.join(odir, "openslides", "plugins") + os.makedirs(plugindir) + # AUTHORS, LICENSE, README write_metadatafile('AUTHORS', os.path.join(odir, 'AUTHORS.txt')) write_metadatafile('LICENSE', os.path.join(odir, 'LICENSE.txt')) diff --git a/openslides/utils/plugins.py b/openslides/utils/plugins.py old mode 100755 new mode 100644 index 56efa564c..aa4185794 --- a/openslides/utils/plugins.py +++ b/openslides/utils/plugins.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -import pkgutil import os +import pkgutil import sys from django.utils.importlib import import_module @@ -35,9 +35,10 @@ def get_plugins_from_path(path): def collect_plugins(): - """Collect all plugins that can be automatically discovered.""" + """ + Collect all plugins that can be automatically discovered. + """ plugins = get_plugins_from_entry_points() - # add all modules in plugins/ dir of portable automatically if detect_openslides_type() == WINDOWS_PORTABLE_VERSION: plugins_path = os.path.join( @@ -45,7 +46,6 @@ def collect_plugins(): if plugins_path not in sys.path: sys.path.append(plugins_path) plugins += get_plugins_from_path(plugins_path) - return plugins