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
synnefo
Commits
d76bc874
Commit
d76bc874
authored
Feb 27, 2013
by
Giorgos Korfiatis
Browse files
Delete obsolete code
parent
cdf3b3d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-astakos-app/astakos/quotaholder/callpoint.py
View file @
d76bc874
...
...
@@ -56,15 +56,6 @@ class QuotaholderDjangoDBCallpoint(Callpoint):
api_spec
=
QuotaholderAPI
()
http_exc_lookup
=
{
CorruptedError
:
550
,
InvalidDataError
:
400
,
InvalidKeyError
:
401
,
NoEntityError
:
404
,
NoQuantityError
:
413
,
NoCapacityError
:
413
,
}
def
init_connection
(
self
,
connection
):
if
connection
is
not
None
:
raise
ValueError
(
"Cannot specify connection args with %s"
%
...
...
@@ -210,18 +201,6 @@ class QuotaholderDjangoDBCallpoint(Callpoint):
return
holdings
def
_set_holding
(
self
,
entity
,
resource
,
policy
,
flags
):
try
:
h
=
db_get_holding
(
entity
=
entity
,
resource
=
resource
,
for_update
=
True
)
h
.
policy
=
p
h
.
flags
=
flags
h
.
save
()
except
Holding
.
DoesNotExist
:
h
=
Holding
.
objects
.
create
(
entity
=
e
,
resource
=
resource
,
policy
=
p
,
flags
=
flags
)
return
h
def
set_holding
(
self
,
context
=
None
,
set_holding
=
()):
rejected
=
[]
append
=
rejected
.
append
...
...
@@ -1102,11 +1081,6 @@ def _add(x, y, invert=False):
return
x
+
y
if
not
invert
else
x
-
y
def
_update
(
dest
,
source
,
attr
,
delta
):
dest_attr
=
getattr
(
dest
,
attr
)
dest_attr
=
_add
(
getattr
(
source
,
attr
,
0
),
delta
)
def
_isneg
(
x
):
return
x
<
0
...
...
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