summaryrefslogtreecommitdiffstats
path: root/lib/puppet/module.rb
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2009-09-04 16:10:20 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-09-05 09:33:14 +1000
commit42ab73f29ada8e045e6638ccb454b12595220fe1 (patch)
tree667bab2c5e9944b70c3abf95b572c7620033d899 /lib/puppet/module.rb
parenta0f0dccb0f42140b9e1cec0cc551b3860c7089c1 (diff)
downloadpuppet-42ab73f29ada8e045e6638ccb454b12595220fe1.tar.gz
puppet-42ab73f29ada8e045e6638ccb454b12595220fe1.tar.xz
puppet-42ab73f29ada8e045e6638ccb454b12595220fe1.zip
Ticket #2525 don't fail find_manifest on invalid module names
The patch that put validity assertions in for module names broke find_manifest because rather than returning a failure it now rasies an exception. This patch catches the exception and treats it as a negative result. Signed-off-by: Markus Roberts <Markus@reality.com>
Diffstat (limited to 'lib/puppet/module.rb')
-rw-r--r--lib/puppet/module.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/module.rb b/lib/puppet/module.rb
index d332392f9..9aa634bc5 100644
--- a/lib/puppet/module.rb
+++ b/lib/puppet/module.rb
@@ -141,6 +141,6 @@ class Puppet::Module
end
def assert_validity
- raise InvalidName unless name =~ /^[\w-]+$/
+ raise InvalidName unless name =~ /^[-\w]+$/
end
end