Merge pull request #34 from ros-windows/hydro-devel

Allow python file to pass 'executable filter' in Windows
This commit is contained in:
Dirk Thomas 2013-10-02 17:04:21 -07:00
commit 956dd589b5
1 changed files with 4 additions and 1 deletions

View File

@ -401,7 +401,10 @@ def find_node(pkg, node_type, rospack=None):
def _executable_filter(test_path):
s = os.stat(test_path)
return (s.st_mode & (stat.S_IRUSR | stat.S_IXUSR) == (stat.S_IRUSR | stat.S_IXUSR))
flags = stat.S_IRUSR | stat.S_IXUSR
if os.name == 'nt' and os.path.splitext(test_path)[1] == '.py':
flags = stat.S_IRUSR
return (s.st_mode & flags) == flags
def _find_resource(d, resource_name, filter_fn=None):
"""