Commits

Michał Górny committed 339063b

Fix ValueError when no SLOT is given for a package.

  • Participants
  • Parent commits 74dcc29

Comments (0)

Files changed (1)

File SmartLiveRebuild/core.py

 
 		def mypkgcut(slottedcpv, n):
 			""" Return n first components of split-joined slottedcpv. """
-			cpv, slot = slottedcpv.rsplit(':', 1)
-			cpv = '-'.join(pkgsplit(cpv)[0:n])
-			return ':'.join([cpv, slot])
+			splitcpv = slottedcpv.rsplit(':', 1)
+			splitcpv[0] = '-'.join(pkgsplit(splitcpv[0])[0:n])
+			return ':'.join(splitcpv)
 
 		if opts.allow_downgrade == 'always':
 			packages = [mypkgcut(x, 1) for x in packages]