Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eurostat-fetcher
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
There was a problem fetching the pipeline stages.
Show more breadcrumbs
dbnomics-fetchers
eurostat-fetcher
Commits
cf516c22
Commit
cf516c22
authored
7 years ago
by
Christophe Benz
Browse files
Options
Downloads
Patches
Plain Diff
Reimplement update_server_info to avoid error
parent
842fe5ca
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#1213
failed with stage
in 1 minute and 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
eurostat_to_dbnomics.py
+8
-2
8 additions, 2 deletions
eurostat_to_dbnomics.py
with
8 additions
and
2 deletions
eurostat_to_dbnomics.py
+
8
−
2
View file @
cf516c22
...
...
@@ -26,6 +26,7 @@
import
argparse
from
collections
import
deque
,
OrderedDict
import
glob
import
hashlib
import
io
import
itertools
...
...
@@ -42,7 +43,6 @@ from dulwich.objects import Blob, Tree, Commit
from
dulwich.pack
import
deltify_pack_objects
,
load_pack_index
,
OFS_DELTA
,
REF_DELTA
,
SHA1Writer
,
write_pack_index_v2
,
\
write_pack_object
,
write_pack_header
from
dulwich.repo
import
Repo
from
dulwich.server
import
update_server_info
from
lxml
import
etree
from
slugify
import
slugify
import
ujson
as
json
...
...
@@ -400,7 +400,13 @@ def main():
)
log
.
info
(
"
Commit ID: %s
"
,
commit_id
)
update_server_info
(
repo
)
# Don't use dulwich.server.update_server_info because it triggers "Too many files open" error.
pack_dir_path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
args
.
target_dir
,
"
objects
"
,
"
pack
"
))
packs_file_path
=
os
.
path
.
join
(
args
.
target_dir
,
"
objects
"
,
"
info
"
,
"
packs
"
)
with
open
(
packs_file_path
,
"
w
"
)
as
packs_file
:
for
pack_file_path
in
glob
.
iglob
(
os
.
path
.
join
(
pack_dir_path
,
"
*.pack
"
)):
pack_file_name
=
os
.
path
.
basename
(
pack_file_path
)
packs_file
.
write
(
"
P {}
\n
"
.
format
(
pack_file_name
))
return
0
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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