Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor folder creation logic in FlameAppFramework #4

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion client/ayon_flame/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ def __init__(self):

self.log.info("[{}] waking up".format(self.__class__.__name__))


try:
self.load_prefs()
except RuntimeError:
Expand Down Expand Up @@ -180,6 +179,14 @@ def load_prefs(self):
(proj_pref_path, user_pref_path,
glob_pref_path) = self.get_pref_file_paths()

# make directories if not exists
try:
os.makedirs(self.prefs_folder, exist_ok=True)
except Exception as err:
self.log.error(
f"Unable to create folder {self.prefs_folder}")
raise err

with io_preferences_file(self, proj_pref_path) as prefs_file:
self.prefs = pickle.load(prefs_file)
self.log.info(
Expand Down