projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
891b224
)
SectionConfig: disable duplicate plugin registration
author
Dietmar Maurer
<dietmar@proxmox.com>
Tue, 26 Jan 2016 12:16:19 +0000
(13:16 +0100)
committer
Dietmar Maurer
<dietmar@proxmox.com>
Tue, 26 Jan 2016 12:16:19 +0000
(13:16 +0100)
src/PVE/SectionConfig.pm
patch
|
blob
|
blame
|
history
diff --git
a/src/PVE/SectionConfig.pm
b/src/PVE/SectionConfig.pm
index 95e166abce88d8101368ee93213b7dda33532525..6f85b228b81ec82c77d64fbbbc8f0197e5274e01 100644
(file)
--- a/
src/PVE/SectionConfig.pm
+++ b/
src/PVE/SectionConfig.pm
@@
-26,6
+26,9
@@
sub register {
my $type = $class->type();
my $pdata = $class->private();
+ die "duplicate plugin registration (type = $type)"
+ if defined($pdata->{plugins}->{$type});
+
my $plugindata = $class->plugindata();
$pdata->{plugindata}->{$type} = $plugindata;
$pdata->{plugins}->{$type} = $class;