Commits

Jason R. Coombs committed d00f420

Prefer the most specialized implementation for which uri_matches passes.

Comments (0)

Files changed (1)

pmxbot/storage.py

 
 	@classmethod
 	def from_URI(cls, URI):
-		candidates = itersubclasses(cls)
+		candidates = reversed(list(itersubclasses(cls)))
 		if hasattr(cls, 'scheme'):
 			candidates = itertools.chain([cls], candidates)
 		matches = (cls for cls in candidates if cls.uri_matches(URI))