Skip to content

Commit

Permalink
allow whitespace in caldb path (fixes issue #434)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-simpson committed Apr 28, 2023
1 parent b27473f commit ccccfb0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions doc/DRAGONS/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ Improvements
* Allow input files to ``shiftImages`` to recognize tabs or multiple
whitespaces as the delimiter

**recipe_system.cal_service**

* Whitespace now allowed in directory paths (if quoted), e.g.,
``databases = "~/.my dragons/dragons.db"``


3.1.0
=====
Expand Down
3 changes: 2 additions & 1 deletion recipe_system/cal_service/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# cal_service
# ------------------------------------------------------------------------------
from os import path
import shlex
import warnings
from importlib import import_module

Expand Down Expand Up @@ -151,7 +152,7 @@ def parse_databases(default_dbname="cal_manager.db"):
for line in databases.splitlines():
if not line: # handle blank lines
continue
db, *flags = line.split()
db, *flags = shlex.split(line)
# "get" is default if there are no flags, but if any flags are
# specified, then "get" must be there explicitly
kwargs = {"get_cal": not bool(flags),
Expand Down

0 comments on commit ccccfb0

Please sign in to comment.