Revision d63a86d6 snf-webproject/synnefo/webproject/management/commands/settings.py

b/snf-webproject/synnefo/webproject/management/commands/settings.py
32 32
from optparse import make_option
33 33
from os.path import isdir
34 34
from pprint import pformat
35
from textwrap import wrap
35 36

  
36 37
NoValue = Setting.NoValue
37 38
available_categories = sorted(Setting.Catalogs['categories'].keys())
......
263 264
            default_value = setting.default_value
264 265
            example_value = setting.example_value
265 266
            dependencies = setting.dependencies
267
            description = setting.description
266 268
            sep = " # "
267 269
            eol = ""
268 270

  
......
272 274
                example_value = pformat(example_value)
273 275
                dependencies = pformat(dependencies)
274 276
                sep = "\n  # "
277
                description = (sep + '  ').join(wrap(description, 70))
275 278
                eol = "\n"
276 279

  
277 280
            format_args = {'name': name,
278 281
                           'value': value,
279 282
                           'example': example_value,
280 283
                           'default': default_value,
281
                           'description': setting.description,
284
                           'description': description,
282 285
                           'dependencies': dependencies,
283 286
                           'serial': setting.serial,
284 287
                           'configured_depth': setting.configured_depth,
......
296 299
                format_str += sep + "Flags: {flags}"
297 300

  
298 301
            if options['display_details']:
302
                format_str += sep + "Description: {description}"
299 303
                format_str += sep + "Dependencies: {dependencies}"
300 304
                format_str += sep + "Depth: {configured_depth}"
301 305
                format_str += sep + "Serial: {serial}"

Also available in: Unified diff