Coverage for watcher/common/paths.py: 0%

9 statements  

« prev     ^ index     » next       coverage.py v7.8.2, created at 2025-06-17 12:22 +0000

1# Copyright 2010 United States Government as represented by the 

2# Administrator of the National Aeronautics and Space Administration. 

3# All Rights Reserved. 

4# Copyright 2012 Red Hat, Inc. 

5# 

6# Licensed under the Apache License, Version 2.0 (the "License"); you may 

7# not use this file except in compliance with the License. You may obtain 

8# a copy of the License at 

9# 

10# http://www.apache.org/licenses/LICENSE-2.0 

11# 

12# Unless required by applicable law or agreed to in writing, software 

13# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 

14# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 

15# License for the specific language governing permissions and limitations 

16# under the License. 

17 

18import os 

19 

20from watcher import conf 

21 

22CONF = conf.CONF 

23 

24 

25def basedir_rel(*args): 

26 """Return a path relative to $pybasedir.""" 

27 return os.path.join(CONF.pybasedir, *args) 

28 

29 

30def bindir_rel(*args): 

31 """Return a path relative to $bindir.""" 

32 return os.path.join(CONF.bindir, *args) 

33 

34 

35def state_path_rel(*args): 

36 """Return a path relative to $state_path.""" 

37 return os.path.join(CONF.state_path, *args)