Skip to content

Commit

Permalink
Updated code to use Path library instead of os
Browse files Browse the repository at this point in the history
  • Loading branch information
schenkkp committed Jan 16, 2025
1 parent 3ecbdcc commit 8e8a8db
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cumulusci/tasks/bulkdata/snowfakery.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import shutil
import time
import typing as T
Expand Down Expand Up @@ -584,8 +583,8 @@ def _generate_and_load_initial_batch(self, working_directory: Path):
self.sets_finished_while_generating_template = num_records

new_template_dir = data_loader_new_directory_name(template_dir, self.run_until)
# don't rename path if new_template_dir matches template_dir
if os.path.abspath(template_dir) != os.path.abspath(new_template_dir):
# rename only if new_template_dir does not match template_dir
if Path(template_dir).resolve() != Path(new_template_dir).resolve():
shutil.move(template_dir, new_template_dir)
template_dir = new_template_dir

Expand Down

0 comments on commit 8e8a8db

Please sign in to comment.