Skip to content

Commit

Permalink
better detection of non-local caldb sources for warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver committed Nov 16, 2022
1 parent 2abe70e commit a25f0ef
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions recipe_system/scripts/caldb.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,13 @@ def _action_config(self, args):
print(f"\033[1mDRAGONS will fall back to legacy config, rc file {dragonsrc_location} not found\033[0m")
print('')

local = True
filenames = expand_filenames(deprecation_warning=False)
print(f"Using configuration files: \033[1m{filenames}\033[0m")
print('')
for db in dbs:
if db[0] != LocalDB.__class__:
local = False
print(db[1])
print(f" Type: {db[0].__name__}")
print(f" Get: {db[2]['get_cal']}")
Expand All @@ -210,16 +213,16 @@ def _action_config(self, args):
print(" NB: The database does not exist. Please initialize it.")
print(" (Read the help message about 'init' command)")
print()
local = True
localdb = self.db
seendbs = list()
while localdb is not None:
if isinstance(self.db, RemoteDB):
local = False
localdb = None
else:
seendbs.append(localdb)
localdb = self.db.nextdb if self.db.nextdb not in seendbs else None
# local = True
# localdb = self.db
# seendbs = list()
# while localdb is not None:
# if isinstance(self.db, RemoteDB):
# local = False
# localdb = None
# else:
# seendbs.append(localdb)
# localdb = self.db.nextdb if self.db.nextdb not in seendbs else None
if local:
print(isactive)
else:
Expand Down

0 comments on commit a25f0ef

Please sign in to comment.