Skip to content

Commit

Permalink
Py2/3: wrap filenames to underlying API in str()
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Jul 21, 2016
1 parent eaea78f commit b44c612
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gdx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, filename='', lazy=True, implicit=True, skip=set()):

# load the GDX API
self._api = GDX()
self._api.open_read(filename)
self._api.open_read(str(filename))

# Basic information about the GDX file
v, p = self._api.file_version()
Expand Down
2 changes: 1 addition & 1 deletion gdx/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def __init__(self):
"""Constructor."""
self._handle = gdxcc.new_gdxHandle_tp()
self.error_count = 0
self.call('CreateD', _gams_dir(), gdxcc.GMS_SSSIZE)
self.call('CreateD', str(_gams_dir()), gdxcc.GMS_SSSIZE)

def call(self, method, *args):
"""Invoke the GDX API method named gdx\ *Method*.
Expand Down

0 comments on commit b44c612

Please sign in to comment.