Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hubert Jasudowicz <hubert.jasudowicz@cert.pl>
  • Loading branch information
catsuryuu and chivay committed Sep 13, 2021
1 parent b03b7c3 commit 2a2b1e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drakrun/drakrun/apiscout.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def build_static_apiscout_profile(

for dll_basename in dll_basename_list:
filepath = Path(apiscout_profile_dir) / f"{dll_basename}.json"
if not os.path.isfile(filepath):
if not filepath.isfile():
log.warning(
f"'{filepath}' not found. Is there a problem with profiles generation?"
)
Expand Down
4 changes: 2 additions & 2 deletions drakrun/drakrun/draksetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1246,15 +1246,15 @@ def do_import_full(mc, name, bucket, zpool):
profiles_prefix = f"{name}/profiles/"
for object in mc.list_objects(bucket, prefix=profiles_prefix):
# Strip profiles prefix
profile_name = object.object_name[len(profiles_prefix) :]
profile_name = object.object_name[len(profiles_prefix):]
mc.fget_object(
bucket, object.object_name, os.path.join(PROFILE_DIR, profile_name)
)

apiscout_profile_prefix = f"{name}/apiscout_profile/"
for object in mc.list_objects(bucket, prefix=apiscout_profile_prefix):
# Strip apiscout profile prefix
filename = object.object_name[len(apiscout_profile_prefix) :]
filename = object.object_name[len(apiscout_profile_prefix):]
mc.fget_object(
bucket, object.object_name, os.path.join(APISCOUT_PROFILE_DIR, filename)
)
Expand Down

0 comments on commit 2a2b1e1

Please sign in to comment.