Projet

Général

Profil

0001-cron-use-print-as-a-function-36233.patch

Frédéric Péters, 29 septembre 2019 16:00

Télécharger (1,38 ko)

Voir les différences:

Subject: [PATCH 1/2] cron: use print as a function (#36233)

 combo/data/management/commands/cron.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
combo/data/management/commands/cron.py
14 14
# You should have received a copy of the GNU Affero General Public License
15 15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16

  
17
from __future__ import print_function
18

  
17 19
import traceback
18 20

  
19 21
from django.apps import apps
......
44 46
        if errors:
45 47
            for error in errors:
46 48
                if options['verbosity'] >= 1:
47
                    print '%s: error: %s' % (error['application'], error['exception'])
49
                    print('%s: error: %s' % (error['application'], error['exception']))
48 50
                if options['verbosity'] >= 2:
49
                    print error['traceback']
50
                    print
51
                    print(error['traceback'])
52
                    print()
51 53
            raise CommandError('error running jobs')
52
-