(self, in_path, magic_in_dir, magic_out_dir, out_ext)
| 993 | return argcopy |
| 994 | |
| 995 | def resolve_executable(self, in_path, magic_in_dir, magic_out_dir, out_ext): |
| 996 | if os.path.isabs(in_path): |
| 997 | return in_path |
| 998 | else: |
| 999 | paths = [ |
| 1000 | os.path.join(magic_out_dir, in_path), |
| 1001 | os.path.join( |
| 1002 | magic_out_dir, |
| 1003 | os.path.relpath(in_path, magic_in_dir), |
| 1004 | ) |
| 1005 | ] |
| 1006 | paths[:] = [os.path.splitext(path)[0] + out_ext for path in paths] |
| 1007 | for path in paths: |
| 1008 | if os.path.exists(path): |
| 1009 | return path |
| 1010 | if not self.env['dry_run']: |
| 1011 | raise Exception('Executable file not found. Tried:\n' + '\n'.join(paths)) |
| 1012 | |
| 1013 | def resolve_userland(self, path): |
| 1014 | return self.resolve_executable( |
no test coverage detected