[damned-lies] Fix TemplateSyntaxError in ifless tag and removed useless imports



commit 4da996cae3b9c8ea99c8bb7e652bbecc663cc0d5
Author: Stéphane Raimbault <stephane raimbault gmail com>
Date:   Sun May 10 18:55:26 2009 +0200

    Fix TemplateSyntaxError in ifless tag and removed useless imports
    
    - use template.TemplateSyntaxError
    - removed threading, os and make_option
---
 stats/management/commands/compile-trans.py  |    1 -
 stats/management/commands/migrate-to-git.py |    1 -
 stats/management/commands/update-trans.py   |    1 -
 stats/templatetags/stats_extras.py          |    2 +-
 stats/tests/__init__.py                     |    1 -
 5 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/stats/management/commands/compile-trans.py b/stats/management/commands/compile-trans.py
index f14d064..3f6099b 100644
--- a/stats/management/commands/compile-trans.py
+++ b/stats/management/commands/compile-trans.py
@@ -1,6 +1,5 @@
 from django.core.management.base import NoArgsCommand
 from django.core.management.commands import compilemessages
-from optparse import make_option
 import os
 import shutil
 
diff --git a/stats/management/commands/migrate-to-git.py b/stats/management/commands/migrate-to-git.py
index 87a2165..eb14832 100644
--- a/stats/management/commands/migrate-to-git.py
+++ b/stats/management/commands/migrate-to-git.py
@@ -1,4 +1,3 @@
-import os
 import shutil
 from django.core.management.base import BaseCommand
 from stats.models import Module, Branch
diff --git a/stats/management/commands/update-trans.py b/stats/management/commands/update-trans.py
index 779e5be..1498902 100644
--- a/stats/management/commands/update-trans.py
+++ b/stats/management/commands/update-trans.py
@@ -1,6 +1,5 @@
 import os
 import shutil
-from optparse import make_option
 
 from django.core.management.base import BaseCommand
 from django.core.management.commands import makemessages
diff --git a/stats/templatetags/stats_extras.py b/stats/templatetags/stats_extras.py
index 474ddae..64a03c9 100644
--- a/stats/templatetags/stats_extras.py
+++ b/stats/templatetags/stats_extras.py
@@ -35,7 +35,7 @@ class IfLessNode(template.Node):
 def ifless(parser, token):
     bits = list(token.split_contents())
     if len(bits) != 3:
-        raise TemplateSyntaxError, "%r takes two arguments" % bits[0]
+        raise template.TemplateSyntaxError, "%r takes two arguments" % bits[0]
     nodelist_true = parser.parse(('else', 'endifless'))
     token = parser.next_token()
     if token.contents == 'else':
diff --git a/stats/tests/__init__.py b/stats/tests/__init__.py
index 064755a..f0b25ed 100644
--- a/stats/tests/__init__.py
+++ b/stats/tests/__init__.py
@@ -19,7 +19,6 @@
 # 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 import os, shutil, unittest
-import threading
 from django.core import mail
 from django.conf import settings
 from stats.models import Module, Domain, Branch, Category, Release, Statistics, Information



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]