Skip to content

Commit 5d8e46f

Browse files
committed
Address a couple of old unrelated pylint used-before-assignment warnings.
1 parent 70d15c6 commit 5d8e46f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mig/shared/fileio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ def send_message_to_grid_notify(message, logger, configuration):
499499
"""Write message to notify home"""
500500
if not logger:
501501
logger = null_logger("dummy")
502+
filepath = 'UNDEFINED'
502503
try:
503504
(filedescriptor, filepath) = make_temp_file(
504505
suffix='.%s' % time.time(),
@@ -788,8 +789,8 @@ def write_named_tempfile(configuration, contents):
788789
os.write(filehandle, force_utf8(contents))
789790
os.close(filehandle)
790791
except Exception as exc:
791-
_logger.error("failed to write tempfile %r: %s" % (tmpname, exc))
792792
tmpname = None
793+
_logger.error("failed to write tempfile %r: %s" % (tmpname, exc))
793794
return tmpname
794795

795796

0 commit comments

Comments
 (0)