View Issue Details

IDProjectCategoryView StatusLast Update
0005695Talerotherpublic2021-08-24 16:23
ReporterMarcello Stanisci Assigned ToMS  
PrioritynormalSeveritytweakReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.8Fixed in Version0.8 
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

buckE

2020-05-11 09:09

reporter   ~0015879

Actually what happens is:

$ ./configure --prefix=/dev/null
./configure: unrecognized option '--prefix=/dev/null'

buckE

2020-06-19 09:42

reporter   ~0016322

Please confirm this is a current bug. I have this:


~/code/bank$ ./configure --prefix=/dev/null
./configure: unrecognized option '--prefix=/dev/null'

MS

2020-09-07 12:16

reporter   ~0016896

This was fixed a while ago. That happens when the config module doesn't find a file/directory:

2020-09-07 12:08:31,242 talerconfig WARNING no base directory found
2020-09-07 12:08:31,242 talerconfig ERROR Configuration file (/not/exist) not found

Issue History

Date Modified Username Field Change
2019-04-19 15:43 Marcello Stanisci New Issue
2020-04-01 16:28 Christian Grothoff Assigned To => buckE
2020-04-01 16:28 Christian Grothoff Status new => assigned
2020-05-11 09:09 buckE Note Added: 0015879
2020-06-19 09:42 buckE Note Added: 0016322
2020-06-19 09:42 buckE Assigned To buckE => Marcello Stanisci
2020-09-04 14:38 MS Assigned To Marcello Stanisci => MS
2020-09-05 13:53 Christian Grothoff Severity minor => tweak
2020-09-07 12:16 MS Note Added: 0016896
2020-09-07 12:16 MS Status assigned => resolved
2020-09-07 12:16 MS Resolution open => fixed
2020-10-03 14:08 Christian Grothoff Fixed in Version => 0.8
2020-10-03 14:10 Christian Grothoff Target Version => 0.8
2021-08-24 16:23 Christian Grothoff Status resolved => closed