From: Jeremy Stanley Date: Sat, 29 Jul 2017 18:42:30 +0000 (+0000) Subject: Stop unnecessarily stripping quote marks X-Git-Tag: 0.0.1~144 X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=commitdiff_plain;h=3716a4cf43e0be2811dc8aeb0603f99209c42757;hp=8a42d3ff1abf80c395de488c5271261fabf33de4 Stop unnecessarily stripping quote marks Since the switch to YAML, quotations around strings are automatically interpreted an so not included in the parsed result. Remove legacy code which stripped leading and trailing quotes from string values as this is no longer needed. --- diff --git a/mudpy/data.py b/mudpy/data.py index c4848be..0483cd7 100644 --- a/mudpy/data.py +++ b/mudpy/data.py @@ -201,10 +201,6 @@ def find_file( ): """Return an absolute file path based on configuration.""" - # make sure to get rid of any surrounding quotes first thing - if file_name: - file_name = file_name.strip("\"'") - # this is all unnecessary if it's already absolute if file_name and os.path.isabs(file_name): return os.path.realpath(file_name) @@ -218,11 +214,11 @@ def find_file( ) and "internal:storage" in universe.contents: storage = universe.categories["internal"]["storage"] if not root_path: - root_path = storage.get("root_path").strip("\"'") + root_path = storage.get("root_path") if not search_path: search_path = storage.get("search_path") if not default_dir: - default_dir = storage.get("default_dir").strip("\"'") + default_dir = storage.get("default_dir") # if there's only one file loaded, try to work around a chicken