diff --git a/product/ERP5Type/Tool/ClassTool.py b/product/ERP5Type/Tool/ClassTool.py
index 8bc9a6c05fa56cb919587f670ad8f43612f16856..19235bcac4ac0cd4ea901e7afbd61450da2cf3d7 100644
--- a/product/ERP5Type/Tool/ClassTool.py
+++ b/product/ERP5Type/Tool/ClassTool.py
@@ -645,13 +645,14 @@ class ConstraintTemplate(Constraint):
             f = open(init, 'w')
             f.close()
           # For convenience, make .cvsignore.
-          cvsignore = os.path.join(path, '.cvsignore')
-          if not os.path.exists(cvsignore):
-            f = open(cvsignore, 'w')
-            try:
-              f.write('*.pyc' + os.linesep)
-            finally:
-              f.close()
+          if generate_cvsignore:
+            cvsignore = os.path.join(path, '.cvsignore')
+            if not os.path.exists(cvsignore):
+              f = open(cvsignore, 'w')
+              try:
+                f.write('*.pyc' + os.linesep)
+              finally:
+                f.close()
 
         # Create a Permissions module for this Product.
         permissions = os.path.join(base_path, 'Permissions.py')