Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
djrandom-py-deleted-112
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This project is pending deletion, and will be deleted on
2025-06-14
. Repository and other project resources are read-only.
Show more breadcrumbs
ale
djrandom-py-deleted-112
Commits
378410f1
Project 'ale/djrandom-py' was moved to 'ale/djrandom-py-deleted-112'. Please update any links and bookmarks that may still have the old path.
Commit
378410f1
authored
13 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
log file name and sha1 to debug checksum mismatches
parent
17cb61d4
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
client/djrandom_client/upload.py
+1
-1
1 addition, 1 deletion
client/djrandom_client/upload.py
client/djrandom_client/utils.py
+1
-1
1 addition, 1 deletion
client/djrandom_client/utils.py
with
2 additions
and
2 deletions
client/djrandom_client/upload.py
+
1
−
1
View file @
378410f1
...
...
@@ -65,6 +65,7 @@ class Uploader(object):
def
upload
(
self
,
path
):
sha1
=
utils
.
sha1_of_file
(
path
)
log
.
info
(
'
new file: %s (%s)
'
%
(
path
,
sha1
))
result
=
self
.
_get
(
'
/check/
'
+
sha1
)
if
result
:
log
.
info
(
'
%s already on server (%s)
'
%
(
path
,
sha1
))
...
...
@@ -83,7 +84,6 @@ class Uploader(object):
break
if
self
.
db
.
has
(
path
):
continue
log
.
info
(
'
new file: %s
'
%
path
)
stats
.
data
.
set
(
'
uploading
'
,
path
)
try
:
self
.
upload
(
path
)
...
...
This diff is collapsed.
Click to expand it.
client/djrandom_client/utils.py
+
1
−
1
View file @
378410f1
...
...
@@ -14,7 +14,7 @@ def generate_path(base_dir, sha1):
def
sha1_of_file
(
path
):
with
open
(
path
,
'
r
'
)
as
fd
:
with
open
(
path
,
'
r
b
'
)
as
fd
:
sha
=
hashlib
.
sha1
()
while
True
:
chunk
=
fd
.
read
(
4096
)
...
...
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