1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-07 05:38:43 +02:00

partial fix for bnc#551147

This commit is contained in:
Jürgen Weigert
2009-10-30 15:19:57 +00:00
parent 09a01158de
commit 4d0db61e12
2 changed files with 5 additions and 2 deletions

View File

@@ -403,8 +403,9 @@ class Project:
ET.SubElement(self.pac_root, 'package', name=name, state=state)
def read_packages(self):
if os.path.isfile(os.path.join(self.absdir, store, '_packages')):
return ET.parse(os.path.join(self.absdir, store, '_packages'))
packages_file = os.path.join(self.absdir, store, '_packages')
if os.path.isfile(packages_file) and os.path.getsize(packages_file):
return ET.parse(packages_file)
else:
# scan project for existing packages and migrate them
cur_pacs = []