Commit d1368a7a authored by Bram Schoenmakers's avatar Bram Schoenmakers

Exit with sys.exit() instead of exit().

parent f433fb24
...@@ -30,7 +30,7 @@ def usage(): ...@@ -30,7 +30,7 @@ def usage():
-v : Print version and exit -v : Print version and exit
""" """
exit(0) sys.exit(0)
def write(p_file, p_string): def write(p_file, p_string):
""" """
...@@ -54,7 +54,7 @@ def version(): ...@@ -54,7 +54,7 @@ def version():
from topydo.lib.Version import VERSION, LICENSE from topydo.lib.Version import VERSION, LICENSE
print "topydo %s\n" % (VERSION) print "topydo %s\n" % (VERSION)
print LICENSE print LICENSE
exit(0) sys.exit(0)
from topydo.lib.Config import config, ConfigError from topydo.lib.Config import config, ConfigError
...@@ -65,7 +65,7 @@ try: ...@@ -65,7 +65,7 @@ try:
config() config()
except ConfigError as config_error: except ConfigError as config_error:
error(str(config_error)) error(str(config_error))
exit(1) sys.exit(1)
from topydo.lib.AddCommand import AddCommand from topydo.lib.AddCommand import AddCommand
from topydo.lib.AppendCommand import AppendCommand from topydo.lib.AppendCommand import AppendCommand
...@@ -104,7 +104,7 @@ class CLIApplication(object): ...@@ -104,7 +104,7 @@ class CLIApplication(object):
opts, args = getopt.getopt(sys.argv[1:], "c:d:ht:v") opts, args = getopt.getopt(sys.argv[1:], "c:d:ht:v")
except getopt.GetoptError as e: except getopt.GetoptError as e:
error(str(e)) error(str(e))
exit(1) sys.exit(1)
alt_path = None alt_path = None
alt_archive = None alt_archive = None
...@@ -210,7 +210,7 @@ class CLIApplication(object): ...@@ -210,7 +210,7 @@ class CLIApplication(object):
usage() usage()
if self.execute(subcommand, args) == False: if self.execute(subcommand, args) == False:
exit(1) sys.exit(1)
if self.todolist.is_dirty(): if self.todolist.is_dirty():
self.archive() self.archive()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment