I opened this issue : https://github.com/web2py/web2py/issues/1093
On Mon, Oct 26, 2015 at 9:59 AM, Richard Vézina <[email protected] > wrote: > I think what Donald is talking about arrive when migrate or pool_size are > missing... In line if in the connection string can do the tricks... But it > more hacky... I would make a default AppConfig file and an user or > application AppConfig file where application AppConfig override the default > one of corse. > > Richard > > On Sat, Oct 24, 2015 at 9:08 PM, 'DenesL' via web2py-users < > [email protected]> wrote: > >> >> from gluon.contrib.appconfig import AppConfig >> myconfig = AppConfig('/private/appconfig.ini', reload=False) >> >> does not cause an exception even when loading the default ini below, >> which has an empty value (last one): >> ; App configuration >> >> ; db configuration >> [db] >> uri = sqlite://storage.sqlite >> migrate = 1 >> pool_size = 1 >> >> ; smtp address and credentials >> [smtp] >> server = smtp.gmail.com:587 >> sender = [email protected] >> login = username:password >> >> >> ; form styling >> [forms] >> formstyle = bootstrap3_inline >> separator = >> >> Can you post an example of what you are doing and the error?. >> >> Denes >> >> >> >> >> On Saturday, October 24, 2015 at 8:31:45 PM UTC-4, Donald McClymont wrote: >>> >>> I like the appconfig file approach however I am not clear if there is a >>> recommended approach to handling missing values in the file. It seems >>> reasonable and convenient that you might want to update the code and the >>> appconfig separately and use a default value if the key isn't present. >>> However at present a missing value seems to raise a BaseException error >>> which isn't ideal for try... except type structures. >>> >>> Can someone recommend how to handle or if this situation should just be >>> avoided? >>> >> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

