diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py index 79899b8b58c..5b2ac219a5d 100755 --- a/misc/log-analytics/import_logs.py +++ b/misc/log-analytics/import_logs.py @@ -1235,6 +1235,9 @@ def invalid_line(line, reason): if not os.path.exists(filename): print >> sys.stderr, 'File %s does not exist' % filename return + elif os.path.getsize(filename) == 0: + print 'File %s is empty' % filename + return else: if filename.endswith('.bz2'): open_func = bz2.BZ2File