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

Refinement of the run function in app.py #148

Merged
merged 1 commit into from
Nov 20, 2024
Merged

Conversation

MakSl
Copy link
Contributor

@MakSl MakSl commented Nov 15, 2024

No description provided.

@@ -73,6 +73,9 @@ def run(self, command, gdb=False, old_binary=False, return_id=True, env=None,
command = [command[0], *use_backup_dir.pb_args, *command[1:]]
elif use_backup_dir:
command = [command[0], *self.backup_dir.pb_args, *command[1:]]
else:
use_backup_dir = self.backup_dir.pb_args[2:]
command = [command[0], *use_backup_dir, *command[1:]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут не
command = [command[0], *self.backup_dir.pb_args, *command[1:]] ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@demonolock,
Если у нас use_backup_dir=true, то строчка действительно так будет выглядеть.
Но если use_backup_dir=false, то значит, что мы сами передаем путь к backup_dir (флаг и путь будет у нас находиться в command). А первые 2 аргумента в self.backup_dir.pb_args это -В и путь. В итоге, будет выдаваться ошибка, что мы дважды указали -В. Поэтому первые 2 значения я пропускаю и добавляю только доп флаги, если они есть.

Copy link
Contributor

@MetalDream666 MetalDream666 Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Скорее, command = [command[0], *self.backup_dir.pb_args[2:], *command[1:]]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MetalDream666 ,
Да, действительно. Так лучше. Поправил.

@MakSl MakSl force-pushed the refinement_run_function branch from 9366283 to 2d2a156 Compare November 19, 2024 13:20
@demonolock demonolock merged commit 644eea8 into master Nov 20, 2024
2 checks passed
@demonolock demonolock deleted the refinement_run_function branch November 20, 2024 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants