qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/3] backup: QEMU Backup Tool


From: Ishani
Subject: Re: [Qemu-devel] [PATCH v2 1/3] backup: QEMU Backup Tool
Date: Wed, 30 Aug 2017 20:27:55 +0530 (IST)


----- On Aug 30, 2017, at 9:51 AM, Fam Zheng address@hidden 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

[Prev in Thread] Current Thread [Next in Thread]