Skip to content

convert vm name to str - #78

Open
tatref wants to merge 1 commit into
wefixit-AT:masterfrom
tatref:unicode
Open

convert vm name to str#78
tatref wants to merge 1 commit into
wefixit-AT:masterfrom
tatref:unicode

Conversation

@tatref

@tatref tatref commented Jan 12, 2022

Copy link
Copy Markdown
Contributor

On Python2.7, vm_from_list is not a str but a unicode object
Fixes #71

I'm not sure if this is a correct fix, or if every field in Config should be converted to str?

oVirtBackup/config.py

Lines 35 to 57 in b9d7005

self.__vm_names = json.loads(config_parser.get(section, "vm_names"))
self.__vm_middle = config_parser.get(section, "vm_middle")
self.__vm_suffix = "_"
self.clear_vm_suffix
self.__server = config_parser.get(section, "server")
self.__username = config_parser.get(section, "username")
self.__password = config_parser.get(section, "password")
self.__snapshot_description = config_parser.get(section, "snapshot_description")
self.__cluster_name = config_parser.get(section, "cluster_name")
self.__datacenter_name = config_parser.get(section, "datacenter_name")
self.__export_domain = config_parser.get(section, "export_domain")
self.__timeout = config_parser.getint(section, "timeout")
self.__backup_keep_count = config_parser.get(section, "backup_keep_count")
self.__backup_keep_count_by_number = config_parser.get(section, "backup_keep_count_by_number")
self.__dry_run = config_parser.getboolean(section, "dry_run")
self.__debug = debug
self.__vm_name_max_length = config_parser.getint(section, "vm_name_max_length")
self.__use_short_suffix = config_parser.getboolean(section, "use_short_suffix")
self.__storage_domain = config_parser.get(section, "storage_domain")
self.__storage_space_threshold = config_parser.getfloat(section, "storage_space_threshold")
self.__logger_fmt = config_parser.get(section, "logger_fmt")
self.__logger_file_path = config_parser.get(section, "logger_file_path")
self.__persist_memorystate = config_parser.getboolean(section, "persist_memorystate")

@wefixit-AT

Copy link
Copy Markdown
Owner

please check the conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: The 'search' parameter should be of type 'str', but it is of type 'unicode'.

2 participants