param_parser: input validation bug fix

This commit is contained in:
Andreas M. Antonopoulos 2012-07-16 23:37:13 -07:00
parent 0e5345d17b
commit c0f8f6251b
1 changed files with 6 additions and 4 deletions

View File

@ -122,10 +122,12 @@ for library in libraries:
paths = library.Path.split(',')
for path in paths:
path = path.strip()
#print "\n Processing file %s" % path
f = open(os.path.normpath(os.path.join(apm_path + '/libraries/' + path)))
p_text = f.read()
f.close()
print "\n Processing file %s" % path
libraryfname = os.path.normpath(os.path.join(apm_path + '/libraries/' + path))
if path and os.path.exists(libraryfname):
f = open(libraryfname)
p_text = f.read()
f.close()
param_matches = prog_group_param.findall(p_text)
print "Found %u documented parameters" % len(param_matches)