File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ )
66and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
77
8+ ## Unreleased
9+
10+ ### Fixed
11+
12+ - ` Registry.install ` returns its argument.
13+
814## [ 2.2.0] - 2018-01-01
915
1016A few methods have been renamed for greater clarity (but functionality remains the same).
Original file line number Diff line number Diff line change @@ -71,12 +71,12 @@ def install(self, opener):
7171 class ArchiveOpener(Opener):
7272 protocols = ['zip', 'tar']
7373 """
74- if not isinstance (opener , Opener ):
75- opener = opener ()
76- assert isinstance ( opener , Opener ), "Opener instance required "
77- assert opener . protocols , "must list one or more protocols"
78- for protocol in opener . protocols :
79- self . _protocols [ protocol ] = opener
74+ _opener = opener if isinstance (opener , Opener ) else opener ()
75+ assert isinstance ( _opener , Opener ), "Opener instance required"
76+ assert _opener . protocols , "must list one or more protocols "
77+ for protocol in _opener . protocols :
78+ self . _protocols [ protocol ] = _opener
79+ return opener
8080
8181 @property
8282 def protocols (self ):
You can’t perform that action at this time.
0 commit comments