[prev in list] [next in list] [prev in thread] [next in thread] 

List:       puppet-commit
Subject:    [Puppet-commit] puppet revision 1994
From:       svn () madstop ! com
Date:       2006-12-29 18:08:15
Message-ID: 20061229180815.7C1CC156BC2 () culain ! madstop ! com
[Download RAW message or body]

luke 2006-12-29 12:08:15 -0600 (Fri, 29 Dec 2006)
Still trying to track down the tagging problem
Modified: trunk/lib/puppet/parser/scope.rb
===================================================================
--- trunk/lib/puppet/parser/scope.rb	2006-12-29 18:05:30 UTC (rev 1993)
+++ trunk/lib/puppet/parser/scope.rb	2006-12-29 18:08:15 UTC (rev 1994)
@@ -519,14 +519,14 @@
     # of the objects contained in this scope.
     def tag(*ary)
         ary.each { |tag|
-            unless tag =~ /^\w[-\w]+$/
-                fail Puppet::ParseError, "Invalid tag %s" % tag.inspect
-            end
             if tag.nil? or tag == ""
                 puts caller
                 Puppet.debug "got told to tag with %s" % tag.inspect
                 next
             end
+            unless tag =~ /^\w[-\w]+$/
+                fail Puppet::ParseError, "Invalid tag %s" % tag.inspect
+            end
             tag = tag.to_s
             unless @tags.include?(tag)
                 #Puppet.info "Tagging scope %s with %s" % [self.object_id, tag]


[Attachment #3 (text/html)]

<p><b>luke</b> 2006-12-29 12:08:15 -0600 (Fri, 29 Dec 2006)</p><p>Still trying to \
track down the tagging problem<br> </p><hr noshade><pre><font color="gray">Modified: \
trunk/lib/puppet/parser/scope.rb \
                ===================================================================
--- trunk/lib/puppet/parser/scope.rb	2006-12-29 18:05:30 UTC (rev 1993)
+++ trunk/lib/puppet/parser/scope.rb	2006-12-29 18:08:15 UTC (rev 1994)
@@ -519,14 +519,14 @@
     # of the objects contained in this scope.
     def tag(*ary)
         ary.each { |tag|
-            unless tag =~ /^\w[-\w]+$/
-                fail Puppet::ParseError, &quot;Invalid tag %s&quot; % tag.inspect
-            end
             if tag.nil? or tag == &quot;&quot;
                 puts caller
                 Puppet.debug &quot;got told to tag with %s&quot; % tag.inspect
                 next
             end
+            unless tag =~ /^\w[-\w]+$/
+                fail Puppet::ParseError, &quot;Invalid tag %s&quot; % tag.inspect
+            end
             tag = tag.to_s
             unless @tags.include?(tag)
                 #Puppet.info &quot;Tagging scope %s with %s&quot; % [self.object_id, \
tag]

</font>
</pre>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic