Skip to content

Commit

Permalink
Clean retrieve dependencies return
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoveda committed Mar 19, 2021
1 parent 8b5e521 commit 03ec94a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion artella/plugins/getdependencies/getdependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from artella import dcc, api
from artella.core.dcc import parser
from artella.core import plugin, qtutils, utils, downloader
from artella.core import plugin, utils, downloader
from artella.plugins.getdependencies.widgets import listdialog, outputdialog

logger = logging.getLogger('artella')
Expand Down Expand Up @@ -160,6 +160,17 @@ def get_non_available_dependencies(self, file_path=None, show_dialogs=True):

deps_retrieved = list()
if non_available_deps:

clean_non_available_deps = list()
for dep in non_available_deps:
if not dep:
continue
if isinstance(dep, (list, tuple)):
clean_non_available_deps.extend(dep)
else:
clean_non_available_deps.append(dep)
non_available_deps = list(tuple(clean_non_available_deps))

api.show_info_message(
'{} Missing dependencies found.'.format(len(non_available_deps)), title='Artella - Get Dependencies')
get_deps = True
Expand Down

0 comments on commit 03ec94a

Please sign in to comment.