- Notifications
You must be signed in to change notification settings - Fork35
Refinement of the run function in app.py#148
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -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:]] |
There was a problem hiding this comment.
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:]] ?
There was a problem hiding this comment.
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 значения я пропускаю и добавляю только доп флаги, если они есть.
MetalDream666Nov 19, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
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:]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@MetalDream666 ,
Да, действительно. Так лучше. Поправил.
9366283
to2d2a156
Compare644eea8
intomasterUh oh!
There was an error while loading.Please reload this page.
No description provided.