1. Michał Górny
  2. gentoopm

Commits

Michał Górny  committed 750eff0

Portage: fix environment.* file sorting.

  • Participants
  • Parent commits 82846ec
  • Branches master

Comments (0)

Files changed (1)

File gentoopm/basepm/pkg.py

View file
  • Ignore whitespace
 				except OSError:
 					return -1
 
-			files = ('environment.bz2', 'environment')
+			files = [os.path.join(p, fn) for fn
+					in ('environment.bz2', 'environment')]
 			# Take the newer one.
-			fn = sorted(files, key=_mtime_if_exists, reverse=True)[0]
-			p = os.path.join(p, fn)
+			p = sorted(files, key=_mtime_if_exists, reverse=True)[0]
 
 		if not os.path.exists(p):
 			return None