Skip to content

Commit

Permalink
Properly ignore Unix sockets on artifact saving
Browse files Browse the repository at this point in the history
Resolves #351
  • Loading branch information
ylobankov committed Apr 9, 2023
1 parent 7db594d commit 3400de7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions listeners.py
Expand Up @@ -222,6 +222,14 @@ def save_artifacts(self):
if not self.failed_workers:
return

def copytree_ignore(path, filenames):
ignored_filenames = []
for filename in filenames:
filepath = os.path.join(path, filename)
if not (os.path.isfile(filepath) or os.path.isdir(filepath)):
ignored_filenames.append(filename)
return ignored_filenames

vardir = Options().args.vardir
artifacts_dir = os.path.join(vardir, 'artifacts')
artifacts_log_dir = os.path.join(artifacts_dir, 'log')
Expand All @@ -241,9 +249,7 @@ def save_artifacts(self):
os.path.basename(reproduce_file_path)))
shutil.copytree(os.path.join(vardir, worker_name),
os.path.join(artifacts_dir, worker_name),
ignore=shutil.ignore_patterns(
'*.i', '*.c',
'*.sock', '*.control'))
ignore=copytree_ignore)
shutil.copytree(os.path.join(vardir, 'statistics'),
os.path.join(artifacts_dir, 'statistics'))

Expand Down

0 comments on commit 3400de7

Please sign in to comment.