summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Reports/reports
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2011-04-07 14:04:36 -0500
committerSol Jerome <sol.jerome@gmail.com>2011-04-07 14:04:36 -0500
commit2e1a79fe401bea5b33551b9f94689524bf43cdca (patch)
tree7627677e9fcc2d7f6534c109a795bfdef87d0530 /src/lib/Server/Reports/reports
parent6f27f7f30ee0bcfcb3f6a4c48c153ea39a2accce (diff)
downloadbcfg2-2e1a79fe401bea5b33551b9f94689524bf43cdca.tar.gz
bcfg2-2e1a79fe401bea5b33551b9f94689524bf43cdca.tar.bz2
bcfg2-2e1a79fe401bea5b33551b9f94689524bf43cdca.zip
PY3K + PEP8 fixes for remaining files
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/lib/Server/Reports/reports')
-rw-r--r--src/lib/Server/Reports/reports/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Server/Reports/reports/models.py b/src/lib/Server/Reports/reports/models.py
index c2be40870..d94b2e1ba 100644
--- a/src/lib/Server/Reports/reports/models.py
+++ b/src/lib/Server/Reports/reports/models.py
@@ -48,7 +48,7 @@ class ClientManager(models.Manager):
if timestamp == None:
timestamp = datetime.now()
elif not isinstance(timestamp, datetime):
- raise ValueError, 'Expected a datetime object'
+ raise ValueError('Expected a datetime object')
else:
try:
timestamp = datetime(*strptime(timestamp,
@@ -113,7 +113,7 @@ class InteractiveManager(models.Manager):
"""
if maxdate and not isinstance(maxdate, datetime):
- raise ValueError, 'Expected a datetime object'
+ raise ValueError('Expected a datetime object')
return self.filter(id__in=self.get_interaction_per_client_ids(maxdate, active_only))
def get_interaction_per_client_ids(self, maxdate=None, active_only=True):
@@ -133,7 +133,7 @@ class InteractiveManager(models.Manager):
'as timer from reports_interaction'
if maxdate:
if not isinstance(maxdate, datetime):
- raise ValueError, 'Expected a datetime object'
+ raise ValueError('Expected a datetime object')
sql = sql + " where timestamp <= '%s' " % maxdate
cfilter = "(expiration is null or expiration > '%s') and creation <= '%s'" % (maxdate, maxdate)
sql = sql + ' GROUP BY client_id) x, reports_interaction where ' + \