Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
re6stnet
Commits
e0917607
Commit
e0917607
authored
May 17, 2024
by
Tom Niget
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle errors in topology
parent
789df211
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
demo/demo
demo/demo
+10
-5
No files found.
demo/demo
View file @
e0917607
...
...
@@ -499,11 +499,12 @@ if args.port:
if page
<
2:
body =
route_svg(page)
else:
body
=
registry.Popen(('python3',
'
-c
',
r
"""
if
1:
import
math
,
json
out
,
err
=
registry.Popen(('python3',
'
-c
',
r
"""
if
1:
import
math
,
json
,
sys
from
re6st
.
registry
import
RegistryClient
g =
json.loads(RegistryClient(
'
http:
//
localhost
/').
topology
())
topo =
RegistryClient('http://localhost/').topology()
g =
json.loads(topo)
assert
g
,
'
Topology
is
empty
'
r =
set(g.pop('',
()))
a =
set()
for
v
in
g
.
values
()
:
...
...
@@ -522,7 +523,11 @@ if args.port:
for
v
in
v:
print
('"%
s
"
-
>
"%s";' % (n, title(v)))
print('}')
"""), stdout=subprocess.PIPE, cwd="..").communicate()[0].decode("utf-8")
"""), stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd="..").communicate()
if err:
self.send_error(500, explain=err.decode("utf-8"))
return
body = out.decode("utf-8")
if body:
body = subprocess.Popen(('neato', '-Tsvg'),
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
...
...
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