[java-sig-commits] [javapackages] Check existence of jar file
Stanislav Ochotnicky
sochotni at fedoraproject.org
Fri Aug 26 13:23:41 UTC 2011
commit 8471e19c6f0a13201844607d8f6241abe89022fe
Author: Stanislav Ochotnicky <sochotnicky at redhat.com>
Date: Fri Aug 26 15:20:07 2011 +0200
Check existence of jar file
scripts/maven_depmap.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/scripts/maven_depmap.py b/scripts/maven_depmap.py
index 6d9386b..c167c57 100644
--- a/scripts/maven_depmap.py
+++ b/scripts/maven_depmap.py
@@ -35,6 +35,7 @@
from optparse import OptionParser
import sys
+import os
import re
import xml.dom.minidom as minidom
from os.path import basename, dirname
@@ -74,6 +75,8 @@ def _get_jpp_from_filename(pom_path, jar_path = None):
"""
pomname = basename(pom_path)
if jar_path:
+ if not os.path.isfile(jar_path):
+ raise IOError("Jar path doesn't exist")
if pomname[3] == '.':
jpp_gid = "JPP/%s" % basename(dirname(jar_path))
jpp_aid = basename(jar_path)[:-4]
More information about the java-sig-commits
mailing list