@@ -349,7 +349,7 @@ def onConnected(interface):
349349 if not stripped_long_name :
350350 meshtastic .util .our_exit ("ERROR: Long Name cannot be empty or contain only whitespace characters" )
351351
352- if args .set_owner_short is not None :
352+ if hasattr ( args , 'set_owner_short' ) and args .set_owner_short is not None :
353353 stripped_short_name = args .set_owner_short .strip ()
354354 if not stripped_short_name :
355355 meshtastic .util .our_exit ("ERROR: Short Name cannot be empty or contain only whitespace characters" )
@@ -414,6 +414,8 @@ def onConnected(interface):
414414 print (" " .join (fieldNames ))
415415
416416 if args .set_ham :
417+ if not args .set_ham .strip ():
418+ meshtastic .util .our_exit ("ERROR: Ham radio callsign cannot be empty or contain only whitespace characters" )
417419 closeNow = True
418420 print (f"Setting Ham ID to { args .set_ham } and turning off encryption" )
419421 interface .getNode (args .dest , ** getNode_kwargs ).setOwner (args .set_ham , is_licensed = True )
@@ -1221,7 +1223,7 @@ def common():
12211223 if hasattr (args , 'set_ham' ) and args .set_ham is not None :
12221224 stripped_ham_name = args .set_ham .strip ()
12231225 if not stripped_ham_name :
1224- meshtastic .util .our_exit ("ERROR: Ham ID cannot be empty or contain only whitespace characters" )
1226+ meshtastic .util .our_exit ("ERROR: Ham radio callsign cannot be empty or contain only whitespace characters" )
12251227
12261228 if have_powermon :
12271229 create_power_meter ()
0 commit comments