Skip to content

Commit 9eb0f4e

Browse files
authored
Cmoabra (#50)
* handle default case
1 parent f26946f commit 9eb0f4e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

bin/cmo_abra

+8-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,14 @@ This method gets command-line option for the tool being wrapped.
3535

3636
def find_command_options(java, abra_jar, version):
3737
# Make command to be run
38-
if distutils.version.StrictVersion(version) >= distutils.version.StrictVersion('2.08'):
39-
cmd = [java, "-jar", abra_jar]
40-
else:
38+
try:
39+
if distutils.version.StrictVersion(version) >= distutils.version.StrictVersion('2.08'):
40+
cmd = [java, "-jar", abra_jar]
41+
else:
42+
cmd = [java, "-jar", abra_jar, "--help"]
43+
except:
44+
#version was default
45+
4146
cmd = [java, "-jar", abra_jar, "--help"]
4247
# Run the command and get the help
4348
print " ".join(cmd)

0 commit comments

Comments
 (0)