View Issue Details

IDProjectCategoryView StatusLast Update
0005695Talerotherpublic2019-04-19 15:43
ReporterMarcello StanisciAssigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0005695: talerconfig.py too much susceptible to missed files / directories
DescriptionThe Python talerconfig "copylib" module uses to crash when it fails to find the directory for defaults.
Instead it should just move on and look - maybe print a WARNING - for the next "element".

  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/marcello/prog/taler/bank/talerbank/settings.py", line 24, in <module>
    TC = TalerConfig.from_file(os.environ.get("TALER_CONFIG_FILE"))
  File "/home/marcello/prog/taler/bank/talerbank/talerconfig.py", line 348, in from_file
    cfg.load_defaults()
  File "/home/marcello/prog/taler/bank/talerbank/talerconfig.py", line 409, in load_defaults
    self.load_dir(os.path.join(prefix, "share/taler/config.d"))
  File "/home/marcello/prog/taler/bank/talerbank/talerconfig.py", line 436, in load_dir
    files = os.listdir(dirname)
NotADirectoryError: [Errno 20] Not a directory: '/dev/null/share/taler/config.d'
Makefile:882: recipe for target 'check' failed
make: *** [check] Error 1
Steps To ReproduceCheckout the bank.git, then

./bootstrap

./configuure --prefix=/dev/null

make check
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-04-19 15:43 Marcello Stanisci New Issue