diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2021-06-08 20:51:12 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-10-30 21:17:30 +0200 |
commit | e23efeb1138ab70a25153f20f3b6d9ef08194429 (patch) | |
tree | fd8207569d766fd24534fd1d37517496c8b4ca51 | |
parent | 6090ab1119ce7947c66d56d168989877f54a29b1 (diff) | |
download | nx-libs-e23efeb1138ab70a25153f20f3b6d9ef08194429.tar.gz nx-libs-e23efeb1138ab70a25153f20f3b6d9ef08194429.tar.bz2 nx-libs-e23efeb1138ab70a25153f20f3b6d9ef08194429.zip |
nxdialog: use os.linesep to make it work on other systems
-rwxr-xr-x | nxdialog/bin/nxdialog | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/nxdialog/bin/nxdialog b/nxdialog/bin/nxdialog index 8713b77c1..4ef19dffc 100755 --- a/nxdialog/bin/nxdialog +++ b/nxdialog/bin/nxdialog @@ -290,7 +290,7 @@ class NxDialogProgram(object): raise except Exception as expt: - sys.stderr.write("Caught exception: %s\n" % (expt)) + sys.stderr.write("Caught exception: %s" % (expt) + os.linesep) sys.exit(EXIT_FAILURE) @staticmethod @@ -363,23 +363,23 @@ class NxDialogProgram(object): """ Disconnect/terminate NX session upon user's request. """ if not self.options.dialog_type: - sys.stderr.write("Dialog type not supplied via --dialog\n") + sys.stderr.write("Dialog type not supplied via --dialog" + os.linesep) sys.exit(EXIT_FAILURE) dlgtype = self.options.dialog_type if dlgtype not in VALID_DLG_TYPES: - sys.stderr.write("Invalid dialog type '%s'\n" % (dlgtype)) + sys.stderr.write("Invalid dialog type '%s'" % (dlgtype) + os.linesep) sys.exit(EXIT_FAILURE) if dlgtype in (DLG_TYPE_PULLDOWN, DLG_TYPE_YESNOSUSPEND, DLG_TYPE_YESNO) and self.options.agentpid is None: - sys.stderr.write("Agent pid not supplied via --parent\n") + sys.stderr.write("Agent pid not supplied via --parent" + os.linesep) sys.exit(EXIT_FAILURE) if dlgtype == DLG_TYPE_PULLDOWN and not self.options.window: - sys.stderr.write("Window id not supplied via --window\n") + sys.stderr.write("Window id not supplied via --window" + os.linesep) sys.exit(EXIT_FAILURE) if self.options.caption: @@ -397,5 +397,4 @@ class NxDialogProgram(object): self.show_dialog(message_caption, message_text) - NxDialogProgram().main() |