Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1f3f0684
authored
Aug 16, 2013
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: makemessages compatibility
parent
0d92152b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
firewall/admin.py
+1
-1
firewall/models.py
+4
-3
No files found.
firewall/admin.py
View file @
1f3f0684
# -*- coding: utf8 -*-
# -*- coding: utf
-
8 -*-
from
django.contrib
import
admin
from
django.contrib
import
admin
from
firewall.models
import
(
Rule
,
Host
,
Vlan
,
Group
,
VlanGroup
,
Firewall
,
from
firewall.models
import
(
Rule
,
Host
,
Vlan
,
Group
,
VlanGroup
,
Firewall
,
...
...
firewall/models.py
View file @
1f3f0684
# -*- coding: utf8 -*-
# -*- coding: utf
-
8 -*-
from
django.contrib.auth.models
import
User
from
django.contrib.auth.models
import
User
from
django.db
import
models
from
django.db
import
models
...
@@ -467,8 +467,9 @@ class Host(models.Model):
...
@@ -467,8 +467,9 @@ class Host(models.Model):
assert
proto
in
(
'tcp'
,
'udp'
,
)
assert
proto
in
(
'tcp'
,
'udp'
,
)
if
public
:
if
public
:
if
public
in
self
.
_get_ports_used
(
proto
):
if
public
in
self
.
_get_ports_used
(
proto
):
raise
ValidationError
(
_
(
"Port
%
s
%
s is already in use."
)
%
raise
ValidationError
(
(
proto
,
public
))
_
(
"Port
%(proto)
s
%(public)
s is already in use."
)
%
{
'proto'
:
proto
,
'public'
:
public
})
else
:
else
:
public
=
self
.
_get_random_port
(
proto
)
public
=
self
.
_get_random_port
(
proto
)
...
...
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