Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
RECIRCLE
/
interface-openstack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
4
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
84275444
authored
4 years ago
by
Arnau Comas Codina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OpenStackError decorator for exceptions, minor change
parent
5b8b9cae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
8 deletions
+0
-8
implementation/network/port_forwarding.py
+0
-2
implementation/utils/decorators.py
+0
-6
No files found.
implementation/network/port_forwarding.py
View file @
84275444
from
openstack.exceptions
import
BadRequestException
from
interface.network.port_forwarding
import
PortForwardingInterface
from
interface.network.port_forwarding
import
PortForwardingInterface
from
interface.network.resources
import
Port
,
FloatingIP
,
PortForwarding
from
interface.network.resources
import
Port
,
FloatingIP
,
PortForwarding
...
...
This diff is collapsed.
Click to expand it.
implementation/utils/decorators.py
View file @
84275444
...
@@ -8,17 +8,12 @@ class ErrorException(Exception):
...
@@ -8,17 +8,12 @@ class ErrorException(Exception):
Attributes:
Attributes:
OpenStackError -- boolean
OpenStackError -- boolean
DuplicateError -- boolean
"""
"""
def
__init__
(
self
,
e
):
def
__init__
(
self
,
e
):
super
()
.
__init__
(
e
)
super
()
.
__init__
(
e
)
self
.
OpenStackError
=
True
self
.
OpenStackError
=
True
self
.
DuplicateError
=
False
if
hasattr
(
e
,
'details'
):
if
'duplicate'
in
e
.
details
:
self
.
DuplicateError
=
True
def
OpenStackError
(
func
):
def
OpenStackError
(
func
):
...
@@ -36,7 +31,6 @@ def OpenStackError(func):
...
@@ -36,7 +31,6 @@ def OpenStackError(func):
raise
ErrorException
(
e
)
raise
ErrorException
(
e
)
except
BadRequestException
as
e
:
except
BadRequestException
as
e
:
import
pdb
;
pdb
.
set_trace
()
raise
ErrorException
(
e
)
raise
ErrorException
(
e
)
except
Exception
as
e
:
except
Exception
as
e
:
...
...
This diff is collapsed.
Click to expand it.
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