Commit e6c621af authored by Jie Yuan's avatar Jie Yuan
Browse files

renew irods version parser

parent ba8c4acb
......@@ -81,7 +81,7 @@ def get_service_tag(service_type,configs=None):
elif service_type == "gitlab":
#tags.append("ce15") #currently for test
tmp = get_by_rpm_packages("gitlab", 0 , 1)
if tmp == "":
if tmp == None or tmp == '' or tmp.find('Failed') >-1:
print("no gitlab version can be resolved")
exit(1)
tags.append(tmp)
......@@ -93,27 +93,18 @@ def get_service_tag(service_type,configs=None):
exit(1)
tags.append(tmp)
if os.path.exists("/var/lib/irods/scritpts/get_irods_version.py") == False:
tmp=get_by_rpm_packages("irods-icat")
if tmp == "":
print("no icat version can be resolved")
exit(1)
tmp=get_by_rpm_packages("irods-server")
if tmp != None and tmp != '' and tmp.find('Failed') == -1:
tags.append(tmp)
return tags
else:
tmp = subprocess.Popen('python /var/lib/irods/scritpts/get_irods_version.py string', shell=True, stdout=subprocess.PIPE)
tmp = tmp.communicate()
if tmp == None or len(tmp) == 0:
print("no irods version can be resolved")
exit(1)
tmp = tmp[0]
if tmp == None or tmp == "":
print("no irods version can be resolved")
exit(1)
tmp.replace("\n","")
tmp.replace(" ","")
tmp=get_by_rpm_packages("irods-icat")
if tmp != None and tmp != '' and tmp.find('Failed') == -1:
tags.append(tmp)
return tags
print("No irods version can be resolved")
exit(-1)
elif service_type == "svmon":
return _tags['svmon']
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment