Imported Debian patch 4.0.5-6~numeezy

This commit is contained in:
Alexandre Ellert
2016-02-17 15:07:45 +01:00
committed by Mario Fetka
parent c44de33144
commit 10dfc9587b
1203 changed files with 53869 additions and 241462 deletions

View File

@@ -25,12 +25,14 @@ import os
from ipaplatform.paths import paths
from ipapython.ipa_log_manager import root_logger
PLUGINS_DIR = paths.IPA_JS_PLUGINS_DIR
def get_plugin_index():
if not os.path.isdir(paths.IPA_JS_PLUGINS_DIR):
if not os.path.isdir(PLUGINS_DIR):
raise Exception("Supplied plugin directory path is not a directory")
dirs = os.listdir(paths.IPA_JS_PLUGINS_DIR)
dirs = os.listdir(PLUGINS_DIR)
index = 'define([],function(){return['
index += ','.join("'"+x+"'" for x in dirs)
index += '];});'
@@ -43,7 +45,7 @@ def application(environ, start_response):
try:
index = get_plugin_index()
status = '200 OK'
except Exception as e:
except Exception, e:
root_logger.error('plugin index generation failed: %s' % e)
status = '200 OK'
index = get_failed()