def retrieve_historic(self, year, month, day):
        """ 
        Retrieve a dictionary such as:
        {
            '1' : [ '00:30', '01:00', '01:30', '02:00' ...],
            '2' : [ '00:30', '01:30', '02:00' ...],
            '3' : [ '00:30', '01:00', '01:30', '02:00' ...],
        }

        Where camera number 2 does not have any measurement at 01:00 (due to a 
        webcam error, or network error, etc.)
        """
        if self._dir is None:
            # No storage: no data
            data = {}
            for light in self._all_lights:
                data[light] = []
            return data

        data = {}
        day_dir = os.path.join(self._dir, str(year), str(month), str(day))
        for light in self._all_lights:
            webcam_dir = os.path.join(day_dir, light)
            current_data = []
            data[light] = current_data
            if os.path.exists(webcam_dir) and os.path.isdir(webcam_dir):
                for f in os.listdir(webcam_dir):
                    full_path = os.path.join(webcam_dir, f)
                    if os.path.isfile(full_path) and self._file_regex.match(f):
                        hours, minutes = f.split('_')
                        formatted = '%s:%s' % (hours.zfill(2), minutes.zfill(2))
                        public_path = (self._public_path, year, month, day, light, f) % '%s/%s/%s/%s/%s/%s'
                        current_data.append( (formatted, public_path) )
            current_data.sort(lambda (x1, x2), (y1, y2) : cmp(x1,y1))
        
        return data
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/experiments/incubator.py/StatusManager.retrieve_historic/swapped operands of `%`