Browse Source

solved small bug for new name functionality to first function addtags

master
alpcentaur 10 months ago
parent
commit
a2b90db08a
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      fdb_spider_interface.py

+ 3
- 3
fdb_spider_interface.py View File

@ -378,10 +378,10 @@ if __name__ == '__main__':
thirdarg = user_input_list[3] thirdarg = user_input_list[3]
except: except:
thirdarg = 'NONE' thirdarg = 'NONE'
if len(room_id_add_tags) >= 1 and len(new_tags) >= 1 and thirdarg == 'NONE':
if room_id_add_tags != 'NONE' and len(new_tags) >= 1 and thirdarg == 'NONE':
try: try:
room_file_add_tags = open('rooms/' + user_input_list[1] + '.txt', 'r')
room_file_add_tags = open('rooms/' + room_id_add_tags + '.txt', 'r')
room_info_raw = room_file_add_tags.read() room_info_raw = room_file_add_tags.read()
room_file_add_tags.close() room_file_add_tags.close()
room_info = room_info_raw.split('§%§%') room_info = room_info_raw.split('§%§%')
@ -390,7 +390,7 @@ if __name__ == '__main__':
if tag not in tag_list: if tag not in tag_list:
tag_list.append(tag) tag_list.append(tag)
room_file_add_tags = open('rooms/' + user_input_list[1] + '.txt', 'w')
room_file_add_tags = open('rooms/' + room_id_add_tags + '.txt', 'w')
room_file_add_tags.write( str(room_info[0]) + '§%§%' + str(room_info[1]) + '§%§%' + str(tag_list)) room_file_add_tags.write( str(room_info[0]) + '§%§%' + str(room_info[1]) + '§%§%' + str(tag_list))
room_file_add_tags.close() room_file_add_tags.close()
answer = 'the updated tag list is' + str(tag_list) answer = 'the updated tag list is' + str(tag_list)

Loading…
Cancel
Save