Ignore:
Timestamp:
21 Feb 2022, 06:21:10 (3 years ago)
Author:
Henrik Bettermann
Message:

Don't complain but remove leading and trailing whitespaces while converting values during import.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.py

    r15748 r16818  
    770770    Returns line num of first illegal char or ``None``. Line nums
    771771    start counting with 1 (not zero). Returns -1 if data contain
    772     trailing whitespaces.
     772    trailing whitespaces (deactivated).
    773773    """
    774774    linenum = 1
     
    777777        for row in reader:
    778778            linenum += 1
    779             for value in row.values():
    780                 if value.endswith(' '):
    781                     return -1
     779            #for value in row.values():
     780            #    if value.endswith(' '):
     781            #        return -1
    782782    except UnicodeDecodeError:
    783783        return linenum
Note: See TracChangeset for help on using the changeset viewer.