Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Stefane Fermigier
neo
Commits
c329ab95
Commit
c329ab95
authored
Apr 20, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
neoctl: better error message when connection to admin fails
parent
8b07ff98
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
neo/lib/connection.py
neo/lib/connection.py
+4
-1
neo/neoctl/neoctl.py
neo/neoctl/neoctl.py
+6
-3
No files found.
neo/lib/connection.py
View file @
c329ab95
...
@@ -506,7 +506,10 @@ class Connection(BaseConnection):
...
@@ -506,7 +506,10 @@ class Connection(BaseConnection):
@
property
@
property
def
setReconnectionNoDelay
(
self
):
def
setReconnectionNoDelay
(
self
):
try
:
return
self
.
connector
.
setReconnectionNoDelay
return
self
.
connector
.
setReconnectionNoDelay
except
AttributeError
:
raise
ConnectionClosed
def
close
(
self
):
def
close
(
self
):
if
self
.
connector
is
None
:
if
self
.
connector
is
None
:
...
...
neo/neoctl/neoctl.py
View file @
c329ab95
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from
neo.lib.app
import
BaseApplication
from
neo.lib.app
import
BaseApplication
from
neo.lib.connection
import
ClientConnection
from
neo.lib.connection
import
ClientConnection
,
ConnectionClosed
from
neo.lib.protocol
import
ClusterStates
,
NodeStates
,
ErrorCodes
,
Packets
from
neo.lib.protocol
import
ClusterStates
,
NodeStates
,
ErrorCodes
,
Packets
from
.handler
import
CommandEventHandler
from
.handler
import
CommandEventHandler
...
@@ -38,11 +38,14 @@ class NeoCTL(BaseApplication):
...
@@ -38,11 +38,14 @@ class NeoCTL(BaseApplication):
self
.
connection
=
ClientConnection
(
self
,
self
.
handler
,
self
.
server
)
self
.
connection
=
ClientConnection
(
self
,
self
.
handler
,
self
.
server
)
# Never delay reconnection to master. This speeds up unit tests
# Never delay reconnection to master. This speeds up unit tests
# and it should not change anything for normal use.
# and it should not change anything for normal use.
try
:
self
.
connection
.
setReconnectionNoDelay
()
self
.
connection
.
setReconnectionNoDelay
()
except
ConnectionClosed
:
self
.
connection
=
None
while
not
self
.
connected
:
while
not
self
.
connected
:
self
.
em
.
poll
(
1
)
if
self
.
connection
is
None
:
if
self
.
connection
is
None
:
raise
NotReadyException
(
'not connected'
)
raise
NotReadyException
(
'not connected'
)
self
.
em
.
poll
(
1
)
return
self
.
connection
return
self
.
connection
def
__ask
(
self
,
packet
):
def
__ask
(
self
,
packet
):
...
...
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