Skip to content

Commit

Permalink
fixed .zip mib source sensing
Browse files Browse the repository at this point in the history
  • Loading branch information
etingof committed Oct 14, 2017
1 parent 573c5c3 commit 0d6c29e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pysmi/reader/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ class ParseResult(tuple):
'query', 'fragment', 'username', 'password',
'hostname', 'port'), mibSource + ('', '', '', None)):
if k == 'scheme':
if mibSource[2].endswith('.zip') or mibSource[2].endswith('.ZIP'):
v = 'zip'
else:
v = 'file'
if not mibSource[0] or mibSource[0] == 'file':
if mibSource[2].endswith('.zip') or mibSource[2].endswith('.ZIP'):
v = 'zip'

setattr(mibSource, k, v)

Expand Down

0 comments on commit 0d6c29e

Please sign in to comment.