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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
re6stnet
Commits
d2a8d5ef
Commit
d2a8d5ef
authored
Jul 20, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demo: fix UnboundLocalError when the registry is down
parent
c97ab3d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
demo/demo
demo/demo
+3
-3
No files found.
demo/demo
View file @
d2a8d5ef
...
@@ -326,7 +326,7 @@ if len(sys.argv) > 1:
...
@@ -326,7 +326,7 @@ if len(sys.argv) > 1:
if page
<
2:
if page
<
2:
body =
route_svg(page)
body =
route_svg(page)
else:
else:
gv
=
registry.Popen(('python',
'
-c
',
r
"""
if
1:
body
=
registry.Popen(('python',
'
-c
',
r
"""
if
1:
import
math
,
json
import
math
,
json
from
re6st
.
registry
import
RegistryClient
from
re6st
.
registry
import
RegistryClient
g =
json.loads(RegistryClient(
g =
json.loads(RegistryClient(
...
@@ -350,10 +350,10 @@ if len(sys.argv) > 1:
...
@@ -350,10 +350,10 @@ if len(sys.argv) > 1:
print
'"%
s
"
-
>
"%s";' % (n, title(v))
print
'"%
s
"
-
>
"%s";' % (n, title(v))
print '}'
print '}'
"""), stdout=subprocess.PIPE, cwd="..").communicate()[0]
"""), stdout=subprocess.PIPE, cwd="..").communicate()[0]
if
gv
:
if
body
:
body = subprocess.Popen(('neato', '-Tsvg'),
body = subprocess.Popen(('neato', '-Tsvg'),
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
).communicate(
gv
)[0]
).communicate(
body
)[0]
if not body:
if not body:
self.send_error(500)
self.send_error(500)
return
return
...
...
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