added better logging

This commit is contained in:
Rudi Grinberg 2012-11-06 14:57:53 -05:00
parent b4555e9845
commit 1762e418c0
3 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,9 @@ def reset_owners():
def get_owner(f):
""" Get the owner id of the file 'f' """
return owners[f] if f in owners else -1
o = owners[f] if f in owners else -1
log.info("Received owner for %s. Owner: %s" % (f, o))
return o
def add_file_owner(f,owner):

View File

@ -52,8 +52,6 @@ class RequestSync(Loggable):
self.logger.info("ApiController.php probably crashed, we \
diagnose this from the fact that it did not return \
valid json")
self.logger.info("Trying again after %f seconds" %
self.request_wait)
except Exception as e: self.unexpected_exception(e)
else: self.logger.info("Request was successful")
self.watcher.flag_done() # poor man's condition variable

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import unittest
import media.monitor.owners as owners
from media.monitor import owners
class TestMMP(unittest.TestCase):
def setUp(self):