Skip to content

Commit

Permalink
fix: ignore xls spurious warning #70
Browse files Browse the repository at this point in the history
- ignore WARNING *** file size (92598) not 512 + multiple of sector size (512)
  • Loading branch information
redstreet committed Jul 5, 2023
1 parent 51280cd commit f38a905
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion beancount_reds_importers/libreader/xlsreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import petl as etl
import re
from beancount_reds_importers.libreader import csvreader
from os import devnull


class Importer(csvreader.Importer):
Expand Down Expand Up @@ -31,4 +32,5 @@ def initialize_reader(self, file):
self.reader_ready = True

def read_raw(self, file):
return etl.fromxls(file.name)
# set logfile to ignore WARNING *** file size (92598) not 512 + multiple of sector size (512)
return etl.fromxls(file.name, logfile=open(devnull, 'w'))

0 comments on commit f38a905

Please sign in to comment.