validations-libs/validations_libs
Federico Ressi 0a7a45f905 Fix VALIDATIONS_LOG_BASEDIR constant when $HOME is undefined
When $HOME environment variable is not defined below definition
raises TypeError:

  VALIDATIONS_LOG_BASEDIR = os.path.join(os.environ.get('HOME'), 'validations')

This replaces it by using os.path.expanduser[1] function

  VALIDATIONS_LOG_BASEDIR = os.path.expanduser('~/validations')

This issue has been detected by Tobiko CI jobs [2]:

 validations_libs/constants.py:25: in <module>
    VALIDATIONS_LOG_BASEDIR = os.path.join(os.environ.get('HOME'), 'validations')
 posixpath.py:76: in join
    a = os.fspath(a)
E   TypeError: expected str, bytes or os.PathLike object, not NoneType

[1] https://docs.python.org/3.6/library/os.path.html#os.path.expanduser
[2] https://813cfae3a1563ccfbfb3-c77d7211b8c124ad183202888cc1ebe6.ssl.cf5.rackcdn.com/796831/4/check/devstack-tobiko-gate/67bcea8/tobiko_results_04_faults_faults.html

Change-Id: I13ba1b2eb0b11c2aded35b44c7fbae643210a269
2021-06-18 10:51:49 +02:00
..
2021-06-10 14:07:10 +02:00
2021-06-10 14:07:10 +02:00
2020-02-28 11:20:15 +01:00
2021-06-10 14:07:10 +02:00