super_rsu: fix exe name when logging its exit
super_rsu logs "<exe name> exiting .." at the end.
The <exe name> it uses is determined by __file__ but this includes the
file extenstion. This changes it to use the entry point name instead
which can be determined from sys.argv[0].
@@ -145,7 +145,8 @@ def parse_timedelta(inp):
def sys_exit(code, msg=None):
- LOG.info("%s exiting with code '%s'", os.path.basename(__file__), code)
+ LOG.info("%s exiting with code '%s'",
+ os.path.basename(sys.argv[0]), code)
if msg is not None:
print(msg)
sys.exit(code)
