mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
validate: Handle wrong paths when listing avalaible apps
User can make mistake or we can have an empty path.
This commit is contained in:
parent
7f8c0c2751
commit
a15b2544ce
1 changed files with 6 additions and 1 deletions
|
@ -792,7 +792,12 @@ class _TestsLauncher(Loggable):
|
||||||
return app_dirs
|
return app_dirs
|
||||||
|
|
||||||
def _exec_app(self, app_dir, env):
|
def _exec_app(self, app_dir, env):
|
||||||
for f in os.listdir(app_dir):
|
try:
|
||||||
|
files = os.listdir(app_dir)
|
||||||
|
except OSError as e:
|
||||||
|
self.debug("Could not list %s: %s" % (app_dir, e))
|
||||||
|
files = []
|
||||||
|
for f in files:
|
||||||
if f.endswith(".py"):
|
if f.endswith(".py"):
|
||||||
execfile(os.path.join(app_dir, f), env)
|
execfile(os.path.join(app_dir, f), env)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue