@@ -127,7 +127,7 @@ def check_vport():
127127 color_print (local .translate ("vport_error" ))
128128#end define
129129
130- def check_git (input_args , default_repo ):
130+ def check_git (input_args , default_repo , text ):
131131 src_dir = "/usr/src"
132132 git_path = f"{ src_dir } /{ default_repo } "
133133 default_author = "ton-blockchain"
@@ -147,9 +147,9 @@ def check_git(input_args, default_repo):
147147 if ((need_author is None and local_author != default_author ) or
148148 (need_repo is None and local_repo != default_repo )):
149149 remote_url = f"https://github.com/{ local_author } /{ local_repo } /tree/{ need_branch if need_branch else local_branch } "
150- raise Exception (f"update error: You are on { remote_url } remote url, to update to the tip use `update { remote_url } ` command" )
150+ raise Exception (f"{ text } error: You are on { remote_url } remote url, to { text } to the tip use `{ text } { remote_url } ` command" )
151151 elif need_branch is None and local_branch != default_branch :
152- raise Exception (f"update error: You are on { local_branch } branch, to update to the tip of { local_branch } branch use `update { local_branch } ` command" )
152+ raise Exception (f"{ text } error: You are on { local_branch } branch, to { text } to the tip of { local_branch } branch use `{ text } { local_branch } ` command" )
153153 #end if
154154
155155 if need_author is None :
@@ -185,7 +185,7 @@ def GetAuthorRepoBranchFromArgs(args):
185185
186186def Update (args ):
187187 repo = "mytonctrl"
188- author , repo , branch = check_git (args , repo )
188+ author , repo , branch = check_git (args , repo , "update" )
189189
190190 # Run script
191191 runArgs = ["bash" , "/usr/src/mytonctrl/scripts/update.sh" , "-a" , author , "-r" , repo , "-b" , branch ]
@@ -200,7 +200,7 @@ def Update(args):
200200
201201def Upgrade (args ):
202202 repo = "ton"
203- author , repo , branch = check_git (args , repo )
203+ author , repo , branch = check_git (args , repo , "upgrade" )
204204
205205 # Run script
206206 runArgs = ["bash" , "/usr/src/mytonctrl/scripts/upgrade.sh" , "-a" , author , "-r" , repo , "-b" , branch ]
0 commit comments