pass
def __repr__(self):
- return '<Queue %s>' % self.queue_name
+ return '<BuildQueue %s>' % self.queue_name
def add_file_from_pool(self, poolfile):
"""Copies a file into the pool. Assumes that the PoolFile object is
poolfile = add_poolfile(filename, dentry, dsc_location_id, session)
pfs.append(poolfile)
files_id = poolfile.file_id
+ else:
+ poolfile = get_poolfile_by_id(files_id, session)
+ if poolfile is None:
+ utils.fubar("INTERNAL ERROR. Found no poolfile with id %d" % files_id)
+ pfs.append(poolfile)
df.poolfile_id = files_id
session.add(df)
)
for table_name in tables:
- table = Table('tbl_%s' % table_name, self.db_meta, autoload=True)
- setattr(self, table_name, table)
+ table = Table(table_name, self.db_meta, autoload=True)
+ setattr(self, 'tbl_%s' % table_name, table)
def __setupmappers(self):
mapper(Architecture, self.tbl_architecture,
primaryjoin=(self.tbl_changes.c.in_queue==self.tbl_policy_queue.c.id)),
approved_for_id = self.tbl_changes.c.approved_for))
- mapper(ChangePendingBinary, self.tbl_changes_pending_binary,
- properties = dict(change_pending_binary_id = self.tbl_changes_pending_binary.c.id))
+ mapper(ChangePendingBinary, self.tbl_changes_pending_binaries,
+ properties = dict(change_pending_binary_id = self.tbl_changes_pending_binaries.c.id))
mapper(ChangePendingFile, self.tbl_changes_pending_files,
properties = dict(change_pending_file_id = self.tbl_changes_pending_files.c.id))