Skip to content

Commit d9176c3

Browse files
committed
change exception to log in check_installer_user
1 parent e007698 commit d9176c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mytonctrl/mytonctrl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def about(local, ton, args):
223223
#end define
224224

225225

226-
def check_installer_user():
226+
def check_installer_user(local):
227227
args = ["whoami"]
228228
process = subprocess.run(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=3)
229229
username = process.stdout.decode("utf-8").strip()
@@ -234,13 +234,13 @@ def check_installer_user():
234234
actual_user = output.split('\n')[1].split()[2]
235235

236236
if username != actual_user:
237-
raise Exception(f'mytonctrl was installed by another user. Probably you need to launch mtc with `{actual_user}` user.')
237+
local.add_log(f'mytonctrl was installed by another user. Probably you need to launch mtc with `{actual_user}` user.', 'error')
238238
#end define
239239

240240

241241
def PreUp(local, ton):
242242
CheckMytonctrlUpdate(local)
243-
check_installer_user()
243+
check_installer_user(local)
244244
check_vport(local, ton)
245245
warnings(local, ton)
246246
# CheckTonUpdate()

0 commit comments

Comments
 (0)