@@ -579,8 +579,16 @@ def push_branches(st: List[StackEntry], remote):
579
579
580
580
581
581
def print_cmd_failure_details (exc : SubprocessError ):
582
- cmd_stdout = exc .stdout .decode ("utf-8" ).replace ("\\ n" , "\n " ).replace ("\\ t" , "\t " )
583
- cmd_stderr = exc .stderr .decode ("utf-8" ).replace ("\\ n" , "\n " ).replace ("\\ t" , "\t " )
582
+ cmd_stdout = (
583
+ exc .stdout .decode ("utf-8" ).replace ("\\ n" , "\n " ).replace ("\\ t" , "\t " )
584
+ if exc .stdout
585
+ else None
586
+ )
587
+ cmd_stderr = (
588
+ exc .stderr .decode ("utf-8" ).replace ("\\ n" , "\n " ).replace ("\\ t" , "\t " )
589
+ if exc .stderr
590
+ else None
591
+ )
584
592
print (f"Exitcode: { exc .returncode } " )
585
593
print (f"Stdout: { cmd_stdout } " )
586
594
print (f"Stderr: { cmd_stderr } " )
@@ -760,7 +768,9 @@ def deduce_base(args: CommonArgs) -> CommonArgs:
760
768
deduced_base = get_command_output (
761
769
["git" , "merge-base" , args .head , f"{ args .remote } /{ args .target } " ]
762
770
)
763
- return CommonArgs (deduced_base , args .head , args .remote , args .target , args .hyperlinks )
771
+ return CommonArgs (
772
+ deduced_base , args .head , args .remote , args .target , args .hyperlinks
773
+ )
764
774
765
775
766
776
def print_tips_after_export (st : List [StackEntry ], args : CommonArgs ):
@@ -1144,7 +1154,10 @@ def create_argparser() -> argparse.ArgumentParser:
1144
1154
"-T" , "--target" , default = "main" , help = "Remote target branch"
1145
1155
)
1146
1156
common_parser .add_argument (
1147
- "--hyperlinks" , action = argparse .BooleanOptionalAction , default = True , help = "Enable or disable hyperlink support."
1157
+ "--hyperlinks" ,
1158
+ action = argparse .BooleanOptionalAction ,
1159
+ default = True ,
1160
+ help = "Enable or disable hyperlink support." ,
1148
1161
)
1149
1162
1150
1163
parser_submit = subparsers .add_parser (
0 commit comments