Skip to content

Commit

Permalink
v5.x Fix various issues
Browse files Browse the repository at this point in the history
Fix issue with single user not showing during building of config
Fix issue when checking windows directories
  • Loading branch information
terrelsa13 committed Sep 21, 2024
1 parent a4c1e11 commit 768c323
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mumc_modules/mumc_builder_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def show_hide_gui_disabled_users(the_dict):

def print_users_to_console(the_dict):

if (len(the_dict['all_users_dict']) > 1):
if (len(the_dict['all_users_dict']) >= 1):
for user in the_dict['all_users_dict']:
the_dict['user_index_total']=the_dict['all_users_dict'].index(user)
the_dict['all_users_dict'][the_dict['user_index_total']]['userPosition']=the_dict['user_index_total']
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#Get the current script version
def get_script_version():
return '5.8.35'
return '5.8.36'


#Get the min config version
Expand Down
10 changes: 6 additions & 4 deletions mumc_modules/mumc_yaml_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,17 @@ def cfgCheckYAML_forLibraries(check_list, user_id_check_list, user_name_check_li
if ('path' in libinfo):
path_found += 1
check_item=check_irt[user_elements][int(check_irt[user_elements].index(libinfo))]['path']
#Check path is string
if (not ((isinstance(check_item,str) and check_item.find('\\') < 0) or (check_item == '') or (check_item == None))):
#Check path is string; checking for backslashes is not compatible with windows
#if (not ((isinstance(check_item,str) and check_item.find('\\') < 0) or (check_item == '') or (check_item == None))):
if (not (isinstance(check_item,str) or (check_item == '') or (check_item == None))):
error_found_in_mumc_config_yaml+='ConfigValueError: ' + config_var_name + ' > user_id: ' + str(check_irt['user_id']) + ' > ' + user_elements + ' > library_id: ' + str(libinfo['lib_id']) + ' > path: ' + str(check_item) + ' is not an expected string value\n'

if ('network_path' in libinfo):
network_path_found += 1
check_item=check_irt[user_elements][int(check_irt[user_elements].index(libinfo))]['network_path']
#Check network_path is string
if (not ((isinstance(check_item,str) and check_item.find('\\') < 0) or (check_item == '') or (check_item == None))):
#Check network_path is string; checking for backslashes is not compatible with windows
#if (not ((isinstance(check_item,str) and check_item.find('\\') < 0) or (check_item == '') or (check_item == None))):
if (not (isinstance(check_item,str) or (check_item == '') or (check_item == None))):
error_found_in_mumc_config_yaml+='ConfigValueError: ' + config_var_name + ' > user_id: ' + str(check_irt['user_id']) + ' > ' + user_elements + ' > library_id: ' + str(libinfo['lib_id']) + ' > network_path: ' + str(check_item) + ' is not an expected string value\n'

if ('subfolder_id' in libinfo):
Expand Down

0 comments on commit 768c323

Please sign in to comment.