Module Config Sections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

 

How can I get a func module to parse config items from a section other than “[main]”?

 

Say I have this module:

 

class Testing(func_module.FuncModule):

    version = "0.0.1"

    api_version = "0.0.1"

    description = "Testing Module"

   

    class Config(BaseConfig):

        main_var = Option()

        other_var = Option()

 

    def configdump(self):

        return self.config_items()

      

And this corresponding config file:

 

[main]

main_var = "some string”

 

[other]

other_var =  “some other string”

 

 

When I run the configdump method, the variable under [other] never gets populated.

 

I see in the BaseConfig class that the populate method is hard coded to “main”

 

    opts.populate(confparser, 'main')

 

 

I’m converting a stand-alone python script to a func module and have quite a few variables to store in the config file.  It would be nice if I  could section these out.  Is this possible?



Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. Email transmission cannot be guaranteed to be secure or error-free. Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product.
_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux