trying to implement generic data structure import

This commit is contained in:
Sebastian Wehling-Benatelli 2014-10-27 12:11:35 +01:00
parent d4bf29e4ff
commit c3e072e952

View File

@ -82,11 +82,15 @@ class GenericDataStructure(object):
base working on. base working on.
''' '''
def __init__(self, stexp=None, folderdepth=4, **kwargs): def __init__(self, stexp=None, folderdepth=4, **kwargs):
dbRegExp = {}
structExpression = [] structExpression = []
depth = 0 depth = 0
while stexp is not os.path.sep: while stexp is not os.path.sep:
try:
[stexp, tlexp] = os.path.split(stexp) [stexp, tlexp] = os.path.split(stexp)
except AttributeError:
rootExpression = None
structExpression = None
break
structExpression.append(tlexp) structExpression.append(tlexp)
depth += 1 depth += 1
if depth is folderdepth: if depth is folderdepth:
@ -95,7 +99,7 @@ class GenericDataStructure(object):
structExpression.reverse() structExpression.reverse()
self.folderDepth = folderdepth self.folderDepth = folderdepth
self.dataBaseDict = kwargs self.dataBaseDict = {}
class SeiscompDataStructure(object): class SeiscompDataStructure(object):