cron: use print as a function (#36233)

This commit is contained in:
Frédéric Péters 2019-09-29 15:21:31 +02:00
parent 2beee8e154
commit 848f36482d
1 changed files with 5 additions and 3 deletions

View File

@ -14,6 +14,8 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function
import traceback
from django.apps import apps
@ -44,8 +46,8 @@ class Command(BaseCommand):
if errors:
for error in errors:
if options['verbosity'] >= 1:
print '%s: error: %s' % (error['application'], error['exception'])
print('%s: error: %s' % (error['application'], error['exception']))
if options['verbosity'] >= 2:
print error['traceback']
print
print(error['traceback'])
print()
raise CommandError('error running jobs')