Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
agkyra
Commits
7c82fd9a
Commit
7c82fd9a
authored
May 21, 2015
by
Giorgos Korfiatis
Browse files
handle case of initial upload
parent
8bf74cdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
agkyra/syncer/pithos_client.py
View file @
7c82fd9a
...
...
@@ -199,10 +199,12 @@ class PithosTargetHandle(object):
logger
.
info
(
"Deleted tmp '%s'"
%
del_name
)
def
directory_put
(
self
,
objname
,
etag
):
if_etag_not_match
=
'*'
if
not
(
etag
)
else
None
r
=
self
.
endpoint
.
object_put
(
objname
,
content_type
=
'application/directory'
,
content_length
=
0
,
if_etag_not_match
=
if_etag_not_match
,
if_etag_match
=
etag
)
return
r
...
...
@@ -229,7 +231,8 @@ class PithosTargetHandle(object):
r
=
self
.
endpoint
.
upload_object
(
self
.
target_objname
,
fil
,
if_etag_match
=
info
.
get
(
"pithos_etag"
))
if_not_exist
=
not
(
etag
),
if_etag_match
=
etag
)
synced_etag
=
r
[
"etag"
]
live_info
=
{
"pithos_etag"
:
synced_etag
,
"pithos_type"
:
common
.
T_FILE
}
...
...
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