Conditions | 4 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | #!/usr/bin/env python |
||
33 | def find(self, filename): |
||
34 | if os.path.isfile(filename): |
||
35 | return filename |
||
36 | |||
37 | command = sys.argv[0] |
||
38 | if '/' != command[0]: |
||
39 | command = os.path.normpath(os.path.join(os.getcwd(), command)) |
||
40 | path = os.path.join(os.path.dirname(os.path.dirname(command)), 'etc', filename) |
||
41 | if os.path.isfile(path): |
||
42 | return path |
||
43 | |||
44 | return os.path.join('/etc/heppy', filename) |
||
45 |