Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
klaus
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
jonashaag
klaus
Commits
5ac11aed
Commit
5ac11aed
authored
9 years ago
by
Jonas Haag
Browse files
Options
Downloads
Plain Diff
Merge pull request #125 from danajpl/python2.6
Tarutils Python 2.6 compatibility
parents
87993de1
858e64af
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
klaus/tarutils.py
+2
-1
2 additions, 1 deletion
klaus/tarutils.py
with
2 additions
and
1 deletion
klaus/tarutils.py
+
2
−
1
View file @
5ac11aed
...
...
@@ -2,6 +2,7 @@ import os
import
stat
import
tarfile
from
io
import
BytesIO
from
contextlib
import
closing
class
ListBytesIO
(
object
):
...
...
@@ -50,7 +51,7 @@ def tar_stream(repo, tree, mtime, format=''):
time of all files in the resulting .tar.gz archive.
"""
buf
=
BytesIO
()
with
tarfile
.
open
(
None
,
"
w:%s
"
%
format
,
buf
)
as
tar
:
with
closing
(
tarfile
.
open
(
None
,
"
w:%s
"
%
format
,
buf
)
)
as
tar
:
for
entry_abspath
,
entry
in
walk_tree
(
repo
,
tree
):
try
:
blob
=
repo
[
entry
.
sha
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment