From 72da857ec0aac5ccf86f8bfec6c36c727e1288e6 Mon Sep 17 00:00:00 2001
From: Jun-Ru Chang <jrjang@gmail.com>
Date: Wed, 29 May 2019 00:16:41 +0800
Subject: [PATCH] Fix converting empty string to integer error

Signed-off-by: Jun-Ru Chang <jrjang@gmail.com>
---
 main.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/main.py b/main.py
index 783bb2b..84899e7 100644
--- a/main.py
+++ b/main.py
@@ -223,13 +223,13 @@ def init_fs_data():
     """
     global tot_num_files
     # Get total number of files (C3)
-    tot_num_files = int(ss_get_cell("D", 1))
+    tot_num_files = ss_get_cell("D", 1)
 
-    if tot_num_files == 0:
+    if tot_num_files == "":
         return
 
     # File names are contained on the B column
-    file_name_data = ss_get_col("B", 1, tot_num_files)
+    file_name_data = ss_get_col("B", 1, int(tot_num_files))
     for (row_num, file_name) in enumerate(file_name_data, start=1):
         file_name = str(file_name)  # File names should be ASCII so syscalls don"t choke
         if len(file_name) > 0: