Skip to content

Commit 0fc58c9

Browse files
author
Brian Luk
committed
Fix loading empty config
1 parent e00e0b0 commit 0fc58c9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cloudinary_cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import cloudinary
22

3-
__version__ = "0.4.0"
3+
__version__ = "0.4.1"
44

55
cloudinary.USER_PLATFORM = "CloudinaryCLI/{}".format(__version__)

cloudinary_cli/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ def initialize():
5858
if os.path.exists(OLD_CLOUDINARY_CLI_CONFIG_FILE):
5959
with open(OLD_CLOUDINARY_CLI_CONFIG_FILE) as f:
6060
try:
61-
old_config = json.loads(f.read())
61+
old_config = json.loads(f.read() or "{}")
6262
except Exception as e:
6363
raise json.JSONDecodeError("Unable to parse old Cloudinary config file")
6464

6565
with open(CLOUDINARY_CLI_CONFIG_FILE) as f:
6666
try:
67-
new_config = json.loads(f.read())
67+
new_config = json.loads(f.read() or "{}")
6868
except Exception as e:
6969
raise json.JSONDecodeError("Unable to parse Cloudinary config file")
7070
new_config.update(old_config)

0 commit comments

Comments
 (0)