----- On Aug 30, 2017, at 9:51 AM, Fam Zheng f...@redhat.com wrote:

> On Tue, 08/29 22:13, Ishani Chugh wrote:
>> +class BackupTool(object):
>> +    """BackupTool Class"""
>> +    def __init__(self, config_file=os.path.expanduser('~') +
>> +                 '/.config/qemu/qemu-backup-config'):
>> +        if "QEMU_BACKUP_CONFIG" in os.environ:
>> +            self.config_file = os.environ["QEMU_BACKUP_CONFIG"]
>> +        else:
>> +            self.config_file = config_file
>> +            try:
>> +                if not os.path.isdir(os.path.dirname(self.config_file)):
>> +                    os.makedirs(os.path.dirname(self.config_file))
>> +            except:
>> +                print("Cannot create config directory", file=sys.stderr)
>> +                sys.exit(1)
>> +        self.config = configparser.ConfigParser()
>> +        self.config.read(self.config_file)
> 
> I suggest adding versioning to the config file, so that a future update to 
> this
> tool can make an incompatible change without breaking older tool:
> 
> [general]
> version=0.1
> 
> [guest_1]
> ...
> 
> [guest_2]
> ...
> 
> And only continue if the version is known.
> 
> Fam

I could not understand the intention behind adding versioning to config file.
Can you please elaborate a little on what is meant by incompatible change?

Regards,
Ishani

Reply via email to