diff --git a/fdb_spider_interface.py b/fdb_spider_interface.py index 0ff0800..ee67903 100644 --- a/fdb_spider_interface.py +++ b/fdb_spider_interface.py @@ -378,10 +378,10 @@ if __name__ == '__main__': thirdarg = user_input_list[3] except: 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: - 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_file_add_tags.close() room_info = room_info_raw.split('§%§%') @@ -390,7 +390,7 @@ if __name__ == '__main__': if tag not in tag_list: 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.close() answer = 'the updated tag list is' + str(tag_list)