Michał Górny avatar Michał Górny committed de78095

Don't use str() when no longer necessary.

Adapting changes in gentoopm-9999.

Comments (0)

Files changed (3)

smartliverebuild/core.py

 				for pkg in pm.installed.filter(filt):
 					try:
 						for vcs in pkg.inherits:
-							vcscl = getvcs(str(vcs), allowed, remote_only = opts.remote_only)
+							vcscl = getvcs(vcs, allowed, remote_only = opts.remote_only)
 							if vcscl is not None:
 								vcs = vcscl(str(pkg.atom.slotted), pkg.environ, opts)
 
 					if el not in nm:
 						del cliargs[i]
 
-			packages = [str(p) for p in packages]
 			if childpid == 0:
 				pdata = {'packages': packages, 'erraneous': erraneous}
 				pipe = os.fdopen(commpipe[1], 'wb')

smartliverebuild/filtering.py

 
 	def __call__(self, pkg):
 		""" Execute filtering on a package. """
-		cp = str(pkg.key)
+		cp = pkg.key
 		r = self._default_pass
 		for m in self._pmatchers:
 			if m.broken:

smartliverebuild/vcs/__init__.py

 
 		self._cpv = [cpv]
 		self._opts = opts
-		self.env = dict([(k, str(v)) for k, v
-			in environ.copy(*(self.reqenv + self.optenv)).items()])
+		self.env = environ.copy(*(self.reqenv + self.optenv))
 
 		missingvars = [v for v in self.reqenv if not self.env[v]]
 		if len(missingvars) > 0:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.