config2py 0.1.31__py3-none-any.whl → 0.1.32__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
config2py/tools.py CHANGED
@@ -27,7 +27,16 @@ def get_configs_local_store(
27
27
  If it's a file, it's assumed to be an ini or cfg file.
28
28
  If it's a string, it's assumed to be an app name, from which to create a folder
29
29
  """
30
- if config_src != 'oa' and os.path.isdir(config_src):
30
+ if os.path.isdir(config_src):
31
+ if os.path.sep not in config_src:
32
+ raise ValueError(
33
+ f"There's a directory named {config_src}, so I'm not sure if you want "
34
+ f" me to make an 'app' folder or not. Please specify "
35
+ f'{config_src + os.path.sep} if you want to use it as a folder. '
36
+ f"If you want to make an 'app' folder for {config_src}, then call the "
37
+ f"get_configs_local_store function from a directory that doesn't "
38
+ 'contain a {config_src} folder.'
39
+ )
31
40
  return TextFiles(config_src)
32
41
  elif os.path.isfile(config_src):
33
42
  # TODO: Not tested
@@ -37,7 +46,6 @@ def get_configs_local_store(
37
46
  from config2py.s_configparser import ConfigStore
38
47
 
39
48
  return ConfigStore(config_src)
40
-
41
49
  elif os.path.sep not in config_src: # it's just a string
42
50
  # TODO: is "get" the right word, since it makes the folder too
43
51
  path = get_configs_folder_for_app(config_src, configs_name=configs_name)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: config2py
3
- Version: 0.1.31
3
+ Version: 0.1.32
4
4
  Summary: Simplified reading and writing configurations from various sources and formats
5
5
  Home-page: https://github.com/i2mint/config2py
6
6
  Author: OtoSense
@@ -2,14 +2,14 @@ config2py/__init__.py,sha256=ru-bUQk5EuOLzHmNAcElSN8P2saSUEb5KFRkfTkzsUo,770
2
2
  config2py/base.py,sha256=saq1YVbeRg8jBoXcmc0y-maNJ5vHHeWwu5tc_EbOetE,15895
3
3
  config2py/errors.py,sha256=QdwGsoJhv6LHDHp-_yyz4oUg1Fgu4S-S7O2nuA0a5cw,203
4
4
  config2py/s_configparser.py,sha256=XhxFz6-PG4-QsecJfbjLFdBWHcPU6dwgqwkTZyY_y3E,15873
5
- config2py/tools.py,sha256=emjvqOGKx2PJwdndbjB0kKMFXO3HC3-twi7ge8UgXz8,8448
5
+ config2py/tools.py,sha256=WOV_MiP2rQopQ3g6qKqurPrDgmZYXViZ-1KspSmeP8E,8971
6
6
  config2py/util.py,sha256=mzIsU2ozkatWx61NphsbD502IrwuI2Vi0V8NEjpNRXQ,15745
7
7
  config2py/scrap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  config2py/tests/__init__.py,sha256=sk-yGJQOZES2z70M4xmZB57tsxSktX_84ybDuV8Cz5Q,297
9
9
  config2py/tests/test_tools.py,sha256=T0rBy8s6wHgQXnnr7Z1xkF1so3XkdGVASerEQ27ByxE,1950
10
10
  config2py/tests/util.py,sha256=vO1VIepbH6vY2e-VHP7HX6jnVzzIDyFsp6md_uBnIXw,1351
11
- config2py-0.1.31.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
12
- config2py-0.1.31.dist-info/METADATA,sha256=YchbjtFSWD4kGhYUBAUBDdRpqKyo04LibFnAJsB5FZY,14559
13
- config2py-0.1.31.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
14
- config2py-0.1.31.dist-info/top_level.txt,sha256=DFnlOIKMIGWQRROr3voJFhWFViHaWgTTeWZjC5YC9QQ,10
15
- config2py-0.1.31.dist-info/RECORD,,
11
+ config2py-0.1.32.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
12
+ config2py-0.1.32.dist-info/METADATA,sha256=CMYOxXWGiNuB3vnVnD3_Xn0foImkipo7K-gQ_mk05nQ,14559
13
+ config2py-0.1.32.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
14
+ config2py-0.1.32.dist-info/top_level.txt,sha256=DFnlOIKMIGWQRROr3voJFhWFViHaWgTTeWZjC5YC9QQ,10
15
+ config2py-0.1.32.dist-info/RECORD,,