← Back to team overview

configglue team mailing list archive

[Merge] lp:~jzhuge/configglue/short_name_for_inischema into lp:configglue

 

JZ has proposed merging lp:~jzhuge/configglue/short_name_for_inischema into lp:configglue.

Requested reviews:
  Configglue developers (configglue)

For more details, see:
https://code.launchpad.net/~jzhuge/configglue/short_name_for_inischema/+merge/306699

Support short_name attribute in config ini file for inischema.
-- 
Your team Configglue developers is requested to review the proposed merge of lp:~jzhuge/configglue/short_name_for_inischema into lp:configglue.
=== modified file 'configglue/inischema/glue.py'
--- configglue/inischema/glue.py	2013-07-11 16:28:28 +0000
+++ configglue/inischema/glue.py	2016-09-25 07:07:15 +0000
@@ -83,6 +83,9 @@
                 parser_fun = lambda x: x
 
             attrs = {'name': option_name}
+            option_short_name = option.attrs.pop('short_name', None)
+            if option_short_name is not None:
+                attrs['short_name'] = option_short_name
             option_help = option.attrs.pop('help', None)
             if option_help is not None:
                 attrs['help'] = option_help


Follow ups