mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-03-09 02:01:09 +00:00
Allow Dates to be absent.
This commit is contained in:
parent
0a2b1fd4b0
commit
0a4f948e3a
17
britney.py
17
britney.py
@ -751,13 +751,16 @@ class Britney(object):
|
||||
dates = {}
|
||||
filename = os.path.join(basedir, "Dates")
|
||||
self.__log("Loading upload data from %s" % filename)
|
||||
for line in open(filename):
|
||||
l = line.split()
|
||||
if len(l) != 3: continue
|
||||
try:
|
||||
dates[l[0]] = (l[1], int(l[2]))
|
||||
except ValueError:
|
||||
self.__log("Dates, unable to parse \"%s\"" % line, type="E")
|
||||
try:
|
||||
for line in open(filename):
|
||||
l = line.split()
|
||||
if len(l) != 3: continue
|
||||
try:
|
||||
dates[l[0]] = (l[1], int(l[2]))
|
||||
except ValueError:
|
||||
self.__log("Dates, unable to parse \"%s\"" % line, type="E")
|
||||
except IOError:
|
||||
self.__log("%s missing; initialising upload data from scratch")
|
||||
return dates
|
||||
|
||||
def write_dates(self, basedir, dates):
|
||||
|
Loading…
x
Reference in New Issue
Block a user