Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions reana_workflow_engine_cwl/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import os
import sys
from io import StringIO
from importlib.metadata import version, PackageNotFoundError

import cwltool.main
import pkg_resources
from cwltool.context import LoadingContext
from reana_commons.config import REANA_LOG_FORMAT, REANA_LOG_LEVEL, REANA_WORKFLOW_UMASK

Expand All @@ -35,10 +35,9 @@

def versionstring():
"""Return string with cwltool version."""
pkg = pkg_resources.require("cwltool")
if pkg:
cwltool_ver = pkg[0].version
else:
try:
cwltool_ver = version("cwltool")
except PackageNotFoundError:
cwltool_ver = "unknown"
return f"{sys.argv[0]} {__version__} with cwltool {cwltool_ver}"

Expand Down
Loading