Skip to content

Commit

Permalink
Merge pull request #267 from STIXProject/mixbox
Browse files Browse the repository at this point in the history
Initial Mixbox support
  • Loading branch information
gtback committed Jun 23, 2015
2 parents 05342c6 + a2c74a7 commit 73b986e
Show file tree
Hide file tree
Showing 50 changed files with 437 additions and 665 deletions.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@ def get_version():
'test': [
'nose==1.3.0',
'tox==1.6.1',
'maec>=4.1.0.12,<4.1.1.0'
'maec>=4.1.0.13.dev0,<4.1.1.0',
],
}


install_requires = [
'lxml>=2.3',
'python-dateutil',
'cybox>=2.1.0.11,<2.1.1.0'
'cybox>=2.1.0.12.dev0,<2.1.1.0',
'mixbox',
]


Expand Down
10 changes: 7 additions & 3 deletions stix/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
import itertools
import StringIO

# external
from mixbox.cache import Cached
from mixbox.binding_utils import save_encoding

# internal
from . import bindings, utils
from . import utils


def _override(*args, **kwargs):
Expand Down Expand Up @@ -182,7 +186,7 @@ def to_xml(self, include_namespaces=True, include_schemalocs=False,
if not pretty:
namespace_def = namespace_def.replace('\n\t', ' ')

with bindings.save_encoding(encoding):
with save_encoding(encoding):
sio = StringIO.StringIO()
obj.export(
sio.write, # output buffer
Expand Down Expand Up @@ -562,7 +566,7 @@ def insert(self, idx, value):
self._inner.insert(idx, value)


class BaseCoreComponent(Entity):
class BaseCoreComponent(Cached, Entity):
_ALL_VERSIONS = ()
_ID_PREFIX = None

Expand Down

0 comments on commit 73b986e

Please sign in to comment.