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
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
5b91bcef
Commit
5b91bcef
authored
Dec 20, 2011
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Plain Diff
Merge "tests: fix LoggerThreadName class for recent Python"
parents
c2b8dbf9
dbcc333d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
neo/tests/threaded/__init__.py
neo/tests/threaded/__init__.py
+8
-5
No files found.
neo/tests/threaded/__init__.py
View file @
5b91bcef
...
@@ -330,19 +330,22 @@ class NeoCTL(neo.neoctl.app.NeoCTL):
...
@@ -330,19 +330,22 @@ class NeoCTL(neo.neoctl.app.NeoCTL):
lambda
self
,
address
:
setattr
(
self
,
'_server'
,
address
))
lambda
self
,
address
:
setattr
(
self
,
'_server'
,
address
))
class
LoggerThreadName
(
object
):
class
LoggerThreadName
(
str
):
def
__
init__
(
self
,
default
=
'TEST'
):
def
__
new__
(
cls
,
default
=
'TEST'
):
self
.
__default
=
default
return
str
.
__new__
(
cls
,
default
)
def
__getattr__
(
self
,
attr
):
def
__getattr
ibute
__
(
self
,
attr
):
return
getattr
(
str
(
self
),
attr
)
return
getattr
(
str
(
self
),
attr
)
def
__hash__
(
self
):
return
id
(
self
)
def
__str__
(
self
):
def
__str__
(
self
):
try
:
try
:
return
threading
.
currentThread
().
node_name
return
threading
.
currentThread
().
node_name
except
AttributeError
:
except
AttributeError
:
return
s
elf
.
__default
return
s
tr
.
__str__
(
self
)
class
Patch
(
object
):
class
Patch
(
object
):
...
...
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