RIST-tinoue / cmiputil

BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Should read in only one config file ? #17

Closed RIST-tinoue closed 5 years ago

RIST-tinoue commented 5 years ago

Currently reads in read several files located in several directories. This may cause unexpected behavior, have to check all files in such case. This is annoying.

RIST-tinoue commented 5 years ago

Search order:

  1. Specified by the argument of __init__()
  2. Specified by the environment variable CMIPUTIL_CONFFILE
  3. $cwd/cmiputil.conf
  4. $HOME/cmiputil.conf

Once found, skip the rests.

RIST-tinoue commented 5 years ago

As the same with the current, if file=None given, no file is read and a blank instance is created.

RIST-tinoue commented 5 years ago

As the same with the current, if file=None given, no file is read and a blank instance is created.

RIST-tinoue commented 5 years ago

Fixed in 7124f8d0d2d93fa8b7f60e6fc7e7abd2a2db28fb.