Conditions | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import os |
||
25 | def getconf(name): |
||
26 | # some users are using symlinks for atomic change of the configuration file |
||
27 | # using mv may however be better practice :p |
||
28 | # so we must not follow symlink when looking for the file |
||
29 | |||
30 | if name.startswith('etc/exabgp'): |
||
31 | normalised = os.path.join(ETC, name[11:]) |
||
32 | else: |
||
33 | normalised = os.path.normpath(name) |
||
34 | |||
35 | if os.path.isfile(os.path.realpath(normalised)): |
||
36 | return normalised |
||
37 | |||
38 | return '' |
||
39 |