Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into aabedabu/generate_…
Browse files Browse the repository at this point in the history
…adc_pattern
  • Loading branch information
bieryAtFnal committed Aug 23, 2023
2 parents 91562fb + a0fe335 commit f715741
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/daqconf/core/assets.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

from os.path import exists,abspath,dirname
from os.path import exists,abspath,dirname,expandvars

from .console import console


from daq_assettools.asset_file import AssetFile
from daq_assettools.asset_database import Database
from sqlite3 import OperationalError
Expand Down Expand Up @@ -49,10 +48,11 @@ def resolve_asset_file(data_file, verbose):

return filename

if data_file != '' and not exists(data_file):
resolved_data_file = abspath(expandvars(data_file))
if resolved_data_file != '' and not exists(resolved_data_file):
raise RuntimeError(f'Cannot find the frames.bin file {data_file}')

if verbose:
console.log(f"Found asset in {dirname(abspath(data_file))}")
console.log(f"Found asset in {dirname(resolved_data_file)}")

return abspath(data_file)
return resolved_data_file

0 comments on commit f715741

Please sign in to comment.