X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/a7d1e3cd75cd56c3f9a5ddceb63196aad9d1db65..af196fd22bf74f7a7e228f8528cff79b863a7351:/src/pz/bank.py

diff --git a/src/pz/bank.py b/src/pz/bank.py
index de22ac0c8..99f7d85a8 100644
--- a/src/pz/bank.py
+++ b/src/pz/bank.py
@@ -4,7 +4,6 @@ from io import StringIO
 from django.conf import settings
 from django.http import HttpResponse
 from django.utils.safestring import mark_safe
-from django.utils.translation import ugettext_lazy as _
 
 
 def bank_export(modeladmin, request, queryset):
@@ -30,6 +29,7 @@ def bank_export(modeladmin, request, queryset):
 def parse_payment_feedback(f):
     lines = csv.reader(StringIO(f.read().decode('cp1250')))
     for line in lines:
+        if not line: continue
         print(line)
         assert line[0] in ('1', '2')
         if line[0] == '1':
@@ -50,6 +50,7 @@ def parse_export_feedback(f):
     # The AU file.
     lines = csv.reader(StringIO(f.read().decode('cp1250')))
     for line in lines:
+        if not line: continue
         payment_id = line[0]
         status = int(line[8])
         comment = line[9]