Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pyDTN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
space-public
pyDTN
Commits
50871f9a
Commit
50871f9a
authored
Sep 12, 2019
by
Juraj Sloboda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve outstanding flake8 errors and warnings
parent
259813d9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
7 deletions
+20
-7
.flake8
.flake8
+1
-0
pydtn/pydtn/__init__.py
pydtn/pydtn/__init__.py
+2
-0
pydtn/pydtn/bundle_protocol/__init__.py
pydtn/pydtn/bundle_protocol/__init__.py
+2
-0
pydtn/pydtn/bundle_protocol/convergence_layers/__init__.py
pydtn/pydtn/bundle_protocol/convergence_layers/__init__.py
+2
-0
pydtn/pydtn/tests/common_unit.py
pydtn/pydtn/tests/common_unit.py
+10
-2
pydtn_rest/pydtn_rest/__init__.py
pydtn_rest/pydtn_rest/__init__.py
+2
-0
pydtn_rest/pydtn_rest/pydtn_rest.py
pydtn_rest/pydtn_rest/pydtn_rest.py
+1
-5
No files found.
.flake8
View file @
50871f9a
[flake8]
max-line-length = 120
ignore = E203,W503
pydtn/pydtn/__init__.py
View file @
50871f9a
...
...
@@ -14,3 +14,5 @@ Submodules
"""
from
.pydtn
import
start
__all__
=
[
"start"
]
pydtn/pydtn/bundle_protocol/__init__.py
View file @
50871f9a
...
...
@@ -21,4 +21,6 @@ Note:
from
.bp
import
BPAgent
__all__
=
[
"bp_agent"
]
bp_agent
=
BPAgent
()
pydtn/pydtn/bundle_protocol/convergence_layers/__init__.py
View file @
50871f9a
...
...
@@ -19,3 +19,5 @@ Note:
"""
from
.tcp_cl
import
TCPCL
__all__
=
[
"TCPCL"
]
pydtn/pydtn/tests/common_unit.py
View file @
50871f9a
...
...
@@ -25,8 +25,16 @@ class TestCommon:
def
test_decode
(
self
):
assert
sdnv_decode
(
bytearray
(
self
.
DATA_READ
),
2
)
==
(
16
,
3
)
SERIAL_RESPONSE
=
b"
\x9f\x89\x07\x00\x01\x82\x01
etest2
\x82\x01
dtest
\x82\x01\x00\x82\x1a
$(
\xde\xf4\x00\x19\x01
,B%r
\x87\t\x01\x00\x02\x04\x82\x18\x1e\x00
D]}
\xd8
u
\x87\x08\x02\x00\x02\x01\x00
D
\x98\x9d\x83
8
\x87\x01\x00\x00\x02\x02
aHDF
\xa2
7
\x80\xff
"
SERIAL_TCPCL_RESPONSE
=
b"
\x13
M
\x9f\x89\x07\x00\x01\x82\x01
etest2
\x82\x01
dtest
\x82\x01\x00\x82\x1a
$(
\xde\xf4\x00\x19\x01
,B%r
\x87\t\x01\x00\x02\x04\x82\x18\x1e\x00
D]}
\xd8
u
\x87\x08\x02\x00\x02\x01\x00
D
\x98\x9d\x83
8
\x87\x01\x00\x00\x02\x02
aHDF
\xa2
7
\x80\xff
"
SERIAL_RESPONSE
=
(
b"
\x9f\x89\x07\x00\x01\x82\x01
etest2
\x82\x01
dtest
\x82\x01\x00\x82\x1a
$(
\xde\xf4\x00\x19\x01
,B"
+
b"%r
\x87\t\x01\x00\x02\x04\x82\x18\x1e\x00
D]}
\xd8
u
\x87\x08\x02\x00\x02\x01\x00
D
\x98\x9d\x83
8"
+
b"
\x87\x01\x00\x00\x02\x02
aHDF
\xa2
7
\x80\xff
"
)
SERIAL_TCPCL_RESPONSE
=
(
b"
\x13
M
\x9f\x89\x07\x00\x01\x82\x01
etest2
\x82\x01
dtest
\x82\x01\x00\x82\x1a
$(
\xde\xf4\x00
"
+
b"
\x19\x01
,B%r
\x87\t\x01\x00\x02\x04\x82\x18\x1e\x00
D]}
\xd8
u
\x87\x08\x02\x00\x02\x01\x00
"
+
b"D
\x98\x9d\x83
8
\x87\x01\x00\x00\x02\x02
aHDF
\xa2
7
\x80\xff
"
)
def
test_serialize
(
self
):
bundle
=
serialize_bundle
(
"dtn:test"
,
"dtn:test2"
,
"H"
,
NULL_EID
,
self
.
UNIX_TIME
)
...
...
pydtn_rest/pydtn_rest/__init__.py
View file @
50871f9a
...
...
@@ -10,3 +10,5 @@ Submodules
"""
from
.pydtn_rest
import
start
__all__
=
[
"start"
]
pydtn_rest/pydtn_rest/pydtn_rest.py
View file @
50871f9a
...
...
@@ -43,11 +43,7 @@ async def handle_config(request):
try
:
for
msg
in
json
[
"messages"
]:
await
bp_agent
.
create_and_send_config_msg
(
destination
,
msg
[
"eid"
],
msg
[
"cla_address"
],
int
(
msg
[
"start_offset"
]),
int
(
msg
[
"end_offset"
]),
destination
,
msg
[
"eid"
],
msg
[
"cla_address"
],
int
(
msg
[
"start_offset"
]),
int
(
msg
[
"end_offset"
])
)
except
NoContactError
as
e
:
return
web
.
json_response
({
"success"
:
False
,
"details"
:
f'There is no scheduled contact for node "
{
e
.
eid
}
"'
})
...
...
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