Skip to content
Snippets Groups Projects
Commit 4695a22f authored by am0ebe's avatar am0ebe
Browse files

fix xtract path bug

parent 830cf00f
No related branches found
No related tags found
No related merge requests found
...@@ -446,7 +446,7 @@ def xtract(): ...@@ -446,7 +446,7 @@ def xtract():
for root, dirs, files in os.walk(INPUTDIR): #walk recursively for root, dirs, files in os.walk(INPUTDIR): #walk recursively
for file in files: for file in files:
if file.endswith(".tgz"): if file.endswith(".tgz"):
file=INPUTDIR+file file=INPUTDIR + os.sep + file
print(f"xtracting {file}\n") print(f"xtracting {file}\n")
cmd_xtract=f"tar -zxvf {file} --directory {INPUTDIR}" cmd_xtract=f"tar -zxvf {file} --directory {INPUTDIR}"
os.system(cmd_xtract) os.system(cmd_xtract)
...@@ -455,7 +455,6 @@ def xtract(): ...@@ -455,7 +455,6 @@ def xtract():
def getFileList(): def getFileList():
animalFile, skyglowFile, trackFiles = '','',[] animalFile, skyglowFile, trackFiles = '','',[]
# xtract()
print( "Looking for 'skyglow.log', 'tags' or files containing 'unit-X'" ) print( "Looking for 'skyglow.log', 'tags' or files containing 'unit-X'" )
for root, dirs, files in os.walk(INPUTDIR): #walk recursively for root, dirs, files in os.walk(INPUTDIR): #walk recursively
for file in files: for file in files:
...@@ -481,6 +480,7 @@ def getFileList(): ...@@ -481,6 +480,7 @@ def getFileList():
def main(): def main():
xtract()
animalFile, skyglowFile, trackFiles = getFileList() animalFile, skyglowFile, trackFiles = getFileList()
data = Data(animalFile,skyglowFile,trackFiles) data = Data(animalFile,skyglowFile,trackFiles)
data.merge() data.merge()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment