diff options
author | Eugeni Dodonov <eugeni@mandriva.org> | 2009-01-06 21:31:46 +0000 |
---|---|---|
committer | Eugeni Dodonov <eugeni@mandriva.org> | 2009-01-06 21:31:46 +0000 |
commit | ff31c9236b1fd7465ea9687fc735e8af882e780e (patch) | |
tree | eec89033b4ad0b2459fbb91fa6dd39077eeaf407 /share/draksec_help.py | |
parent | ab984707253940bf5ced3a379699e8d0dc757fa6 (diff) | |
download | msec-ff31c9236b1fd7465ea9687fc735e8af882e780e.tar msec-ff31c9236b1fd7465ea9687fc735e8af882e780e.tar.gz msec-ff31c9236b1fd7465ea9687fc735e8af882e780e.tar.bz2 msec-ff31c9236b1fd7465ea9687fc735e8af882e780e.tar.xz msec-ff31c9236b1fd7465ea9687fc735e8af882e780e.zip |
Updated to working version of new msec.
Conflicts:
Makefile
cron-sh/security_check.sh
share/msec.py
Diffstat (limited to 'share/draksec_help.py')
-rwxr-xr-x | share/draksec_help.py | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/share/draksec_help.py b/share/draksec_help.py deleted file mode 100755 index b57ab86..0000000 --- a/share/draksec_help.py +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/python -#--------------------------------------------------------------- -# Project : Mandriva Linux -# Module : share -# File : draksec_help.py -# Version : $Id$ -# Author : Thierry Vignaud -# Created On : Sat Jan 26 17:38:39 2002 -# Purpose : loads a python module and creates a help hash -# for draksec. -#--------------------------------------------------------------- - -import sys -import imp -import inspect -import re - -header = '''package security::help; -# !! THIS FILE WAS AUTO-GENERATED BY draksec_help.py !! -# !! DO NOT MODIFY HERE, MODIFY IN THE *MSEC* CVS !! - -use strict; -use common; - -our %help = ( -''' - -footer = '''); -''' - -### strings used in the rewritting -function_str = ''' -'%s' => N("Arguments: %s -%s"), -''' - -### code -modulename = sys.argv[1] - -module = __import__(modulename) - -sys.stdout.write(header) - -clean = re.compile('^.[a-z].*\n', re.M) -clean2 = re.compile('^\n', re.M) -perl = re.compile('^([A-Z_0-9]*) (.*)$', re.M) - -for f in inspect.getmembers(module, inspect.isfunction): - (args, varargs, varkw, locals) = inspect.getargspec(f[1]) - doc = f[1].__doc__ - if doc and len(doc) > 2: - doc = doc[2:] - argspec = inspect.formatargspec(args, varargs, varkw, locals) + '\n' - if f[0] == 'set_security_conf': - doc = clean.sub('', doc) - doc = clean2.sub('', doc) - doc = perl.sub('\\1 => N("\\2"),', doc) - sys.stdout.write(doc) - else: - s = function_str % (f[0], argspec, doc) - sys.stdout.write(s) - -sys.stdout.write(footer) - -# draksec_help.py ends here |