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
May 05, 2020
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.resources
import
Port
,
FloatingIP
,
PortForwarding
...
...
implementation/utils/decorators.py
View file @
84275444
...
...
@@ -8,17 +8,12 @@ class ErrorException(Exception):
Attributes:
OpenStackError -- boolean
DuplicateError -- boolean
"""
def
__init__
(
self
,
e
):
super
()
.
__init__
(
e
)
self
.
OpenStackError
=
True
self
.
DuplicateError
=
False
if
hasattr
(
e
,
'details'
):
if
'duplicate'
in
e
.
details
:
self
.
DuplicateError
=
True
def
OpenStackError
(
func
):
...
...
@@ -36,7 +31,6 @@ def OpenStackError(func):
raise
ErrorException
(
e
)
except
BadRequestException
as
e
:
import
pdb
;
pdb
.
set_trace
()
raise
ErrorException
(
e
)
except
Exception
as
e
:
...
...
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