« Previous | Next » 

Revision 523170de

ID523170de667f8c9f02393fe4b16aa2a9c9226a81

Added by Dimitris Aragiorgis almost 7 years ago

Override get() method of ConfigParser

During backup import/export SafeConfigParser() is used to
save/restore instance's configuration. There is a possibility if an
export is done with a different Ganeti version, a specific value not
to be saved during export (e.g. the NIC/Disk name) but still
requested during import.

With this patch we override the get() method of SafeConfigParser()
and catch NoOptionError if raised and return None. Additionally we
translate "None" values read from .ini file into None.

Signed-off-by: Dimitris Aragiorgis <>
Signed-off-by: Michele Tartara <>
Reviewed-by: Michele Tartara <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences