mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 07:37:08 +00:00
Adapt import functions to use logical paths
This commit is contained in:
@@ -4,9 +4,10 @@ import sps
|
||||
Preplot importing functions.
|
||||
"""
|
||||
|
||||
def from_file (file):
|
||||
def from_file (file, realpath = None):
|
||||
filepath = realpath or file["path"]
|
||||
if not "type" in file or file["type"] == "sps":
|
||||
records = sps.from_file(file["path"], file["format"] if "format" in file else None )
|
||||
records = sps.from_file(filepath, file["format"] if "format" in file else None )
|
||||
else:
|
||||
return "Not an SPS file"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user