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
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
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
Hide 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):
...
@@ -80,7 +80,6 @@ def _wrapOpen(func):
return
srw
return
srw
return
wrapper
return
wrapper
lzma
=
None
gzip_open
=
gzip
.
open
gzip_open
=
gzip
.
open
if
sys
.
version_info
>=
(
3
,
3
):
if
sys
.
version_info
>=
(
3
,
3
):
import
lzma
import
lzma
...
@@ -90,16 +89,15 @@ else:
...
@@ -90,16 +89,15 @@ else:
gzip_open
=
_wrapOpen
(
gzip_open
)
gzip_open
=
_wrapOpen
(
gzip_open
)
bz2_open
=
_wrapOpen
(
bz2
.
BZ2File
)
bz2_open
=
_wrapOpen
(
bz2
.
BZ2File
)
_read_mode
=
'r'
_read_mode
=
'r'
try
:
from
backports
import
lzma
except
ImportError
:
lzma
=
None
FILE_OPENER_LIST
=
[
FILE_OPENER_LIST
=
[
(
gzip_open
,
IOError
),
(
gzip_open
,
IOError
),
(
bz2_open
,
IOError
),
(
bz2_open
,
IOError
),
]
]
if
lzma
is
None
:
try
:
from
backports
import
lzma
except
ImportError
:
pass
if
lzma
is
not
None
:
if
lzma
is
not
None
:
FILE_OPENER_LIST
.
append
((
lzma
.
open
,
lzma
.
LZMAError
))
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