Skip to content

Commit

Permalink
Merge pull request #101 from m3dev/dev_module
Browse files Browse the repository at this point in the history
fix dump tuple module versions
  • Loading branch information
vaaaaanquish authored Sep 24, 2019
2 parents d2764f6 + 823dcd6 commit 32bc44e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gokart/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,5 +288,9 @@ def _get_module_versions(self) -> str:
for x in set([x.split('.')[0] for x in sys.modules.keys() if '_' not in x]):
module = import_module(x)
if '__version__' in dir(module):
module_versions.append(f'{x}=={module.__version__.split(" ")[0]}')
if type(module.__version__)==str:
version = module.__version__.split(" ")[0]
else:
version = '.'.join([str(v) for v in module.__version__])
module_versions.append(f'{x}=={version}')
return '\n'.join(module_versions)

0 comments on commit 32bc44e

Please sign in to comment.