Cleaned get methods of Repo and RepoPath
This commit is contained in:
		 Massimiliano Culpo
					Massimiliano Culpo
				
			
				
					committed by
					
						 Peter Scheibel
						Peter Scheibel
					
				
			
			
				
	
			
			
			 Peter Scheibel
						Peter Scheibel
					
				
			
						parent
						
							76b5af6bf3
						
					
				
				
					commit
					400aa5fe51
				
			| @@ -638,11 +638,8 @@ def repo_for_pkg(self, spec): | |||||||
|         return self.first_repo() |         return self.first_repo() | ||||||
|  |  | ||||||
|     @autospec |     @autospec | ||||||
|     def get(self, spec, new=False): |     def get(self, spec): | ||||||
|         """Find a repo that contains the supplied spec's package. |         """Returns the package associated with the supplied spec.""" | ||||||
|  |  | ||||||
|            Raises UnknownPackageError if not found. |  | ||||||
|         """ |  | ||||||
|         return self.repo_for_pkg(spec).get(spec) |         return self.repo_for_pkg(spec).get(spec) | ||||||
|  |  | ||||||
|     def get_pkg_class(self, pkg_name): |     def get_pkg_class(self, pkg_name): | ||||||
| @@ -873,6 +870,7 @@ def _read_config(self): | |||||||
|  |  | ||||||
|     @autospec |     @autospec | ||||||
|     def get(self, spec): |     def get(self, spec): | ||||||
|  |         """Returns the package associated with the supplied spec.""" | ||||||
|         if not self.exists(spec.name): |         if not self.exists(spec.name): | ||||||
|             raise UnknownPackageError(spec.name) |             raise UnknownPackageError(spec.name) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user