[packages/pynapi] - rel 4; catch unrecognized errors
arekm
arekm at pld-linux.org
Sat Apr 27 20:49:18 CEST 2013
commit cc30ce30e3266d831625bd98b582e020d8b04e72
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Apr 27 20:49:15 2013 +0200
- rel 4; catch unrecognized errors
pynapi.py | 7 +++++--
pynapi.spec | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/pynapi.spec b/pynapi.spec
index 8c55f4e..441c239 100644
--- a/pynapi.spec
+++ b/pynapi.spec
@@ -2,7 +2,7 @@ Summary: pynapi - Movie Subtitle Downloader
Summary(pl.UTF-8): pynapi - narzędzie do ściągania napisów do filmów
Name: pynapi
Version: 0.18
-Release: 3
+Release: 4
License: GPL v3+
Group: Applications/Multimedia
Source0: pynapi.py
diff --git a/pynapi.py b/pynapi.py
index 459118f..86d8ca0 100644
--- a/pynapi.py
+++ b/pynapi.py
@@ -137,9 +137,12 @@ def get_subtitle(digest, lang="PL"):
error = error + ",HTTP code: %s" % (str(http_code))
time.sleep(0.5)
continue
-
+
+ err_add = ''
+ if sub.startswith('NPc'):
+ err_add = " (unknown error)"
if len(sub.split('\n')) < 20:
- raise Exception('Subtitle NOT FOUND')
+ raise Exception('Subtitle NOT FOUND%s' % err_add)
repeat = 0
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/pynapi.git/commitdiff/cc30ce30e3266d831625bd98b582e020d8b04e72
More information about the pld-cvs-commit
mailing list