Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apachedex
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
apachedex
Commits
12fe7cff
Commit
12fe7cff
authored
Sep 14, 2016
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apachedex: Simplify lzma detection code.
parent
e457bb6f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
apachedex/__init__.py
apachedex/__init__.py
+4
-6
No files found.
apachedex/__init__.py
View file @
12fe7cff
...
...
@@ -80,7 +80,6 @@ def _wrapOpen(func):
return
srw
return
wrapper
lzma
=
None
gzip_open
=
gzip
.
open
if
sys
.
version_info
>=
(
3
,
3
):
import
lzma
...
...
@@ -90,16 +89,15 @@ else:
gzip_open
=
_wrapOpen
(
gzip_open
)
bz2_open
=
_wrapOpen
(
bz2
.
BZ2File
)
_read_mode
=
'r'
try
:
from
backports
import
lzma
except
ImportError
:
lzma
=
None
FILE_OPENER_LIST
=
[
(
gzip_open
,
IOError
),
(
bz2_open
,
IOError
),
]
if
lzma
is
None
:
try
:
from
backports
import
lzma
except
ImportError
:
pass
if
lzma
is
not
None
:
FILE_OPENER_LIST
.
append
((
lzma
.
open
,
lzma
.
LZMAError
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment