Skip to content

Commit

Permalink
change import style for python3
Browse files Browse the repository at this point in the history
  • Loading branch information
ysuga committed Oct 13, 2017
1 parent eccfeb4 commit 87324fe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions idl_parser/parser.py
Expand Up @@ -3,7 +3,7 @@

from . import module, token_buffer
from . import type as idl_type
from exception import *
from . import exception

class IDLParser():

Expand Down Expand Up @@ -97,7 +97,7 @@ def get_fullpath(idl_path):

self.for_each_idl(get_fullpath)
if len(included_filenames) > 0:
raise IDLCanNotFindException()
raise exception.IDLCanNotFindException()

return included_filepaths

Expand Down
4 changes: 2 additions & 2 deletions idl_parser/struct.py
Expand Up @@ -2,7 +2,7 @@

from . import node
from . import type as idl_type
from exception import *
from . import exception

class IDLMember(node.IDLNode):
def __init__(self, parent):
Expand Down Expand Up @@ -50,7 +50,7 @@ def type(self):
typs = self.root_node.find_types(self._type.name)
if len(typs) == 0:
print('Can not find Data Type (%s)\n' % self._type.name)
raise InvalidDataTypeException()
raise exception.InvalidDataTypeException()
return typs[0]
return self._type

Expand Down
4 changes: 2 additions & 2 deletions idl_parser/type.py
@@ -1,7 +1,7 @@
import os, sys, traceback

from . import node
from exception import *
from . import exception

sep = '::'

Expand Down Expand Up @@ -214,7 +214,7 @@ def parse_size(self, size):
except:
if self._verbose: sys.stdout.write(
"# Error. Array index '%s' not an integer.\n" % size_literal)
raise InvalidDataTypeException()
raise exception.InvalidDataTypeException()

return size_literal

Expand Down
4 changes: 2 additions & 2 deletions idl_parser/union.py
Expand Up @@ -2,7 +2,7 @@

from . import node
from . import type as idl_type

from . import exception

class IDLUnionMember(node.IDLNode):
def __init__(self, parent):
Expand All @@ -28,7 +28,7 @@ def parse_blocks(self, blocks, filepath=None):
token = blocks.pop(0)
if token != ':':
if self._verbose: sys.stdout.write('# Error. No ":" after case value.\n')
raise InvalidDataTypeException()
raise exception.InvalidDataTypeException()

name, typ = self._name_and_type(blocks)
if name.find('[') >= 0:
Expand Down

0 comments on commit 87324fe

Please sign in to comment.