Skip to content

Commit

Permalink
Fix parsing of power7+ platform string
Browse files Browse the repository at this point in the history
We need to strip any trailing '+' before converting to int.

Signed-off-by: Anton Blanchard <[email protected]>
  • Loading branch information
antonblanchard authored and Zdenek Pavlas committed Jul 12, 2013
1 parent 6a65f13 commit cbdc106
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpmUtils/arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def getCanonPPCArch(arch):
return arch

try:
if platform.startswith("power") and int(platform[5:]) >= 7:
if platform.startswith("power") and int(platform[5:].rstrip('+')) >= 7:
return "ppc64p7"
except:
pass
Expand Down

0 comments on commit cbdc106

Please sign in to comment.