[gnome-schedule/eximport] fix typo, switchable usage
- From: Gaute Hope <gauteh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-schedule/eximport] fix typo, switchable usage
- Date: Sat, 11 Jun 2011 16:13:13 +0000 (UTC)
commit 03e95b96078df2ce285fb498c6df04423e24b395
Author: Gaute Hope <eg gaute vetsj com>
Date: Sat Jun 11 18:12:32 2011 +0200
fix typo, switchable usage
src/gnome-schedule-export.py | 8 +++++---
src/gnome-schedule-import.py | 8 +++++---
2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/gnome-schedule-export.py b/src/gnome-schedule-export.py
index 1dee70a..ed62896 100755
--- a/src/gnome-schedule-export.py
+++ b/src/gnome-schedule-export.py
@@ -42,9 +42,11 @@ if poscorrect_isset == False:
os.putenv ("POSIXLY_CORRECT", "enabled")
manual_poscorrect = True
-sys.stderr.write(_("Gnome Schedule: Export tasks.") + "\n")
-sys.stderr.write(_("Usage: %s [output file]" % sys.argv[0]) + "\n")
-sys.stderr.write(_(" No file means export to stdout.") + "\n\n")
+sys.stderr.write(_("Gnome Schedule: Export tasks") + "\n")
+if ("-h" in sys.argv) or ("--help" in sys.argv):
+ sys.stderr.write(_("Usage: %s [output file]" % sys.argv[0]) + "\n")
+ sys.stderr.write(_(" No file means export to stdout.") + "\n\n")
+ sys.exit(0)
# Parse arguments
diff --git a/src/gnome-schedule-import.py b/src/gnome-schedule-import.py
index 36e9857..336f3da 100755
--- a/src/gnome-schedule-import.py
+++ b/src/gnome-schedule-import.py
@@ -60,9 +60,11 @@ user_shell = pwd.getpwuid (uid)[6]
if uid == 0: is_root = True
else: is_root = False
-sys.stderr.write(_("Gnome Schedule: Import tasks tasks.") + "\n")
-sys.stderr.write(_("Usage: %s [input file]" % sys.argv[0]) + "\n")
-sys.stderr.write(_(" No file means import from stdin.") + "\n\n")
+sys.stderr.write(_("Gnome Schedule: Import tasks") + "\n")
+if ("-h" in sys.argv) or ("--help" in sys.argv):
+ sys.stderr.write(_("Usage: %s [input file]" % sys.argv[0]) + "\n")
+ sys.stderr.write(_(" No file means import from stdin.") + "\n\n")
+ sys.exit(0)
# Check file
if outf != False:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]