[Mageia-sysadm] [612] do not use a variable called module in template, this is a reserved ruby keyword

root at mageia.org root at mageia.org
Wed Dec 15 02:39:27 CET 2010


Revision: 612
Author:   misc
Date:     2010-12-15 02:39:27 +0100 (Wed, 15 Dec 2010)
Log Message:
-----------
do not use a variable called module in template, this is a reserved ruby keyword

Modified Paths:
--------------
    puppet/modules/apache/manifests/init.pp
    puppet/modules/apache/templates/django.wsgi

Modified: puppet/modules/apache/manifests/init.pp
===================================================================
--- puppet/modules/apache/manifests/init.pp	2010-12-14 18:29:48 UTC (rev 611)
+++ puppet/modules/apache/manifests/init.pp	2010-12-15 01:39:27 UTC (rev 612)
@@ -119,6 +119,8 @@
     define vhost_django_app($module, $module_path = '/usr/share') {
         include apache::mod_wsgi
 
+        # module is a ruby reserved keyword, cannot be used in templates
+        $django_module = $module
         file { "$name.conf":
             path => "/etc/httpd/conf/vhosts.d/$name.conf",
             ensure => "present",

Modified: puppet/modules/apache/templates/django.wsgi
===================================================================
--- puppet/modules/apache/templates/django.wsgi	2010-12-14 18:29:48 UTC (rev 611)
+++ puppet/modules/apache/templates/django.wsgi	2010-12-15 01:39:27 UTC (rev 612)
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 import os, sys
 sys.path.append('<%= module_path  %>')
-os.environ['DJANGO_SETTINGS_MODULE'] = '<%= module %>.settings'
+os.environ['DJANGO_SETTINGS_MODULE'] = '<%= django_module %>.settings'
 
 import django.core.handlers.wsgi
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101215/34e34409/attachment.html>


More information about the Mageia-sysadm mailing list