From 3f74e776750d1ed06d8ec0227f818bfadc735d5f Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 29 Mar 2017 02:12:01 +0300 Subject: [PATCH] =?UTF-8?q?=D1=80=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cron.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cron.py b/cron.py index 582ce34..020036e 100755 --- a/cron.py +++ b/cron.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import django @@ -51,7 +51,5 @@ def main(): if __name__ == "__main__": try: main() - except NasNetworkError as e: - print(e) - except NasFailedResult as e: - print(e) + except (NasNetworkError, NasFailedResult) as e: + print('NAS:', e)