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

change the return of the get_by_rpm_packages function

parent fd9a8ef7
......@@ -148,8 +148,7 @@ def get_by_rpm_packages(software,start=0,end=0):
tmp = tmp.communicate()
tmp = tmp[0]
if tmp == None or tmp == "":
print("no rpm packages can be found for " + software)
exit(1)
return "Failed, no rpm packages can be found for " + software
ind=tmp.find(software)
ind=ind+len(software)
ltmp=tmp[ind+1:len(tmp)].split('-')
......@@ -163,10 +162,10 @@ def get_by_rpm_packages(software,start=0,end=0):
res=res+ltmp[i]
return res
else:
print("The start index should be smaller than end index for a correct rpm package resolver")
return "Failed, the start index should be smaller than end index for a correct rpm package resolver"
else:
print(software +" version not resolved")
exit(1)
return "Failed," + software +" version not resolved"
def get_user():
......
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