Skip to content

Commit 61794b8

Browse files
authored
Change _read_value_from_file to return empty string instead of throwing error when the file is empty. (#1016)
1 parent 68251ca commit 61794b8

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

core/src/main/python/wlsdeploy/util/variables.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,19 +310,16 @@ def _read_value_from_file(file_path, model_context):
310310
:raises BundleAwareException if an error occurs while reading the value
311311
"""
312312
method_name = '_read_value_from_file'
313-
313+
line = None
314314
try:
315315
file_reader = BufferedReader(FileReader(file_path))
316316
line = file_reader.readLine()
317317
file_reader.close()
318318
except IOException, e:
319319
_report_token_issue('WLSDPLY-01733', method_name, model_context, file_path, e.getLocalizedMessage())
320-
line = ''
321320

322321
if line is None:
323-
ex = exception_helper.create_variable_exception('WLSDPLY-01734', file_path)
324-
_logger.throwing(ex, class_name=_class_name, method_name=method_name)
325-
raise ex
322+
line = ''
326323

327324
return str(line).strip()
328325

0 commit comments

Comments
 (0)