Skip to content

Commit

Permalink
Merge pull request #42 from Bugazelle/dev
Browse files Browse the repository at this point in the history
[Fix] Fix some issues raised by "7yl4r"
  • Loading branch information
Bugazelle authored Oct 7, 2020
2 parents 9298bcf + 85cb3d2 commit 20ed753
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ExportCsvToInflux/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.24'
__version__ = '0.1.25'
2 changes: 2 additions & 0 deletions src/ExportCsvToInflux/csv_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ def convert_csv_data_to_int_float(self, file_name=None, csv_reader=None):
len_value = len(value)
# Continue If Value Empty
if len_value == 0:
int_type[key].append(False)
float_type[key].append(False)
continue
# Valid Int Type
try:
Expand Down
4 changes: 2 additions & 2 deletions src/ExportCsvToInflux/exporter_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ def __process_tags_fields(columns,
try:
v = int(v)
except ValueError:
print('Warning: Failed to force "{0}" to float, skip...'.format(v))
print('Warning: Failed to force "{0}" to int, skip...'.format(v))
if force_float_columns and column in force_float_columns:
try:
v = float(v)
except ValueError:
print('Warning: Failed to force "{0}" to int, skip...'.format(v))
print('Warning: Failed to force "{0}" to float, skip...'.format(v))

# If field is empty
if len(str(v)) == 0:
Expand Down

0 comments on commit 20ed753

Please sign in to comment.