Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
lscsoft
bilby
Commits
e5fc75be
Commit
e5fc75be
authored
May 29, 2018
by
Gregory Ashton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add information to debug info
parent
b07fe9a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tupak/result.py
tupak/result.py
+3
-3
No files found.
tupak/result.py
View file @
e5fc75be
...
...
@@ -39,7 +39,7 @@ class Result(dict):
def
__init__
(
self
,
dictionary
=
None
):
if
type
(
dictionary
)
is
dict
:
for
key
in
dictionary
:
setattr
(
self
,
key
,
self
.
_decode_object
(
dictionary
[
key
]))
setattr
(
self
,
key
,
self
.
_decode_object
(
dictionary
[
key
]
,
key
))
def
__getattr__
(
self
,
name
):
try
:
...
...
@@ -62,7 +62,7 @@ class Result(dict):
else
:
return
''
def
_decode_object
(
self
,
item
):
def
_decode_object
(
self
,
item
,
name
=
None
):
""" When reading in data, ensure all bytes are decoded to strings """
if
type
(
item
)
==
pd
.
DataFrame
:
return
item
...
...
@@ -76,7 +76,7 @@ class Result(dict):
except
(
AttributeError
,
TypeError
):
pass
logging
.
debug
(
"Unable to decode item
"
)
logging
.
debug
(
"Unable to decode item
{}"
.
format
(
name
)
)
return
item
def
get_result_dictionary
(
self
):
...
...
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