# rhona, cleans up unassociated binary and source packages
# Copyright (C) 2000 James Troup <james@nocrew.org>
-# $Id: rhona,v 1.6 2000-12-20 08:15:35 troup Exp $
+# $Id: rhona,v 1.7 2001-01-10 06:08:03 troup Exp $
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
if overrides == {}:
filename = Cnf["Dir::OverrideDir"] + Cnf["Rhona::OverrideFilename"];
- file = utils.open_file(filename, 'r');
- for line in file.readlines():
- line = string.strip(utils.re_comments.sub('', line))
- if line != "":
- overrides[line] = 1
- file.close()
+ try:
+ file = utils.open_file(filename, 'r');
+ except utils.cant_open_exc:
+ pass;
+ else:
+ for line in file.readlines():
+ line = string.strip(utils.re_comments.sub('', line))
+ if line != "":
+ overrides[line] = 1
+ file.close()
return overrides.get(package, None);
print "rhona version 0.0000000000";
usage(0);
+ override_filename = Cnf["Dir::OverrideDir"] + Cnf["Rhona::OverrideFilename"];
+ if not os.access(override_filename, os.R_OK):
+ sys.stderr.write("W: Could not find source-only override file '%s'.\n" % (override_filename));
+
delete_date = time.strftime("%Y-%m-%d %H:%M", time.localtime(time.time()));
check_binaries();