Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
'update'::
This command will try to update the local database.
+ +
+ It will terminate with a return code of zero if the database has been
+ successfully updated. 1 on error, 2 on invalid call and 3 if the
+ database was already the latest version.
'--help'::
Shows a short help text on using this program.
# If we have not received a new file, there is nothing to do
if not t:
- return 0
+ return 3
# Write temporary file to destination
shutil.copyfile(t.name, ns.database)
# Remove temporary file
os.unlink(t.name)
+ return 0
+
def main():
# Run the command line interface