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
17cf6a79
Commit
17cf6a79
authored
May 26, 2015
by
Giorgos Korfiatis
Browse files
fix deletion
parent
a808bfc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
agkyra/syncer/pithos_client.py
View file @
17cf6a79
...
...
@@ -183,8 +183,7 @@ class PithosTargetHandle(object):
del_name
=
self
.
mk_del_name
(
objname
,
etag
)
logger
.
info
(
"Moving temporarily to '%s'"
%
del_name
)
self
.
_move_object
(
objname
,
etag
,
del_name
)
self
.
endpoint
.
del_object
(
del_name
)
logger
.
info
(
"Deleted tmp '%s'"
%
del_name
)
self
.
_del_object
(
del_name
)
def
_move_object
(
self
,
objname
,
etag
,
del_name
):
container
=
self
.
endpoint
.
container
...
...
@@ -199,6 +198,16 @@ class PithosTargetHandle(object):
else
:
raise
def
_del_object
(
self
,
del_name
):
try
:
self
.
endpoint
.
del_object
(
del_name
)
logger
.
info
(
"Deleted tmp '%s'"
%
del_name
)
except
ClientError
as
e
:
if
e
.
status
==
404
:
logger
.
warning
(
"'%s' not found; already deleted?"
%
del_name
)
else
:
raise
def
directory_put
(
self
,
objname
,
etag
):
if_etag_not_match
=
'*'
if
not
(
etag
)
else
None
r
=
self
.
endpoint
.
object_put
(
...
...
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