Skip to content

Commit 8203099

Browse files
author
Bryan Worrell
committed
Merge pull request #7 from bworrell/master
bug fixes in from_dict() methods
2 parents 7ea48ec + f57cc2a commit 8203099

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/ex_01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
def main():
1616
fn = 'ex_01.xml'
17-
(stix_package, stix_package_obj) = STIXPackage.from_xml(fn)
17+
(stix_package, stix_package_binding_obj) = STIXPackage.from_xml(fn)
1818
stix_dict = stix_package.to_dict() # parse to dictionary
1919
pprint(stix_dict)
2020

stix/core/stix_header.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def to_obj(self, return_obj=None):
7474

7575
@classmethod
7676
def from_dict(cls, dict_repr, return_obj=None):
77-
if not dict:
77+
if not dict_repr:
7878
return None
7979

8080
if not return_obj:

0 commit comments

Comments
 (0)