e.g. datacenter.cfg is optional and produce at start of a Vm an error if it is missing. --- src/PVE/JSONSchema.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 2837cf5..d40692f 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -1144,14 +1144,13 @@ sub get_options { sub parse_config { my ($schema, $filename, $raw) = @_; # do fast check (avoid validate_schema($schema)) die "got strange schema" if !$schema->{type} || !$schema->{properties} || $schema->{type} ne 'object'; my $cfg = {}; - while ($raw =~ /^\s*(.+?)\s*$/gm) { + while (defined($raw) && $raw =~ /^\s*(.+?)\s*$/gm) { my $line = $1; next if $line =~ /^#/; -- 2.1.4 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel