Skip to content

Commit

Permalink
Fix typo in var name
Browse files Browse the repository at this point in the history
  • Loading branch information
jordimas committed Nov 29, 2024
1 parent 6bc73e9 commit a600d96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/builder/downloadfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def urlopen_with_retry(self, url):
)
timeout = timeout * 4
except Exception as e:
print(type(e))
logging.error(
f"Error on urlopen_with_retry. URL: '{url}', error: '{e}'"
)
Expand Down
12 changes: 6 additions & 6 deletions src/builder/fileset.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@


class FileSet:
invidual_pos_dir = ""
individual_pos_dir = ""

def __init__(
self, project_name, project_id, name, url, filename, parent_fileset=None
Expand Down Expand Up @@ -68,7 +68,7 @@ def set_retrieval_pattern(self, retrieval_pattern):
def set_out_directory(self, out_directory):
POS_DIR = "individual_pos/"
self.out_directory = out_directory
self.invidual_pos_dir = os.path.join(
self.individual_pos_dir = os.path.join(
out_directory, POS_DIR, self.project_id, self.name.lower()
)

Expand Down Expand Up @@ -174,22 +174,22 @@ def build(self):
self._copy_to_output()

def _copy_to_output(self):
if not os.path.exists(self.invidual_pos_dir):
os.makedirs(self.invidual_pos_dir)
if not os.path.exists(self.individual_pos_dir):
os.makedirs(self.individual_pos_dir)

findFiles = FindFiles()
files = findFiles.find_recursive(self.temp_dir, "*.po")
for source in files:
dirname = os.path.dirname(source)
if dirname != self.temp_dir:
d = os.path.join(
self.invidual_pos_dir, dirname[len(self.temp_dir) + 1 :]
self.individual_pos_dir, dirname[len(self.temp_dir) + 1 :]
)
if not os.path.exists(d):
os.makedirs(d)

target = os.path.join(
self.invidual_pos_dir, source[len(self.temp_dir) + 1 :]
self.individual_pos_dir, source[len(self.temp_dir) + 1 :]
)
shutil.copy(source, target)

Expand Down

0 comments on commit a600d96

Please sign in to comment.