mirror of
https://abf.rosa.ru/djam/abf-console-client-src.git
synced 2025-02-23 18:02:50 +00:00
Dopr existing removed_sources sections
This commit is contained in:
parent
3ec54d0e67
commit
565f546734
1 changed files with 7 additions and 3 deletions
|
@ -51,7 +51,7 @@ def get_project_name(path=None):
|
|||
owner_name, project_name = m.groups()
|
||||
# Cant tell abf owner from github loc, so let's hardocde it
|
||||
if "OpenMandriva" in owner_name:
|
||||
return ("openmandriva", project_name)
|
||||
return ('openmandriva', project_name)
|
||||
return (owner_name, project_name)
|
||||
return (None, None)
|
||||
except ReturnCodeNotZero:
|
||||
|
@ -64,7 +64,7 @@ def parse_spec_silently(ts, spec_path):
|
|||
try:
|
||||
os.dup2(sys.stderr.fileno(), stderr)
|
||||
os.dup2(sys.stdout.fileno(), stdout)
|
||||
se = file('/dev/null', 'w')
|
||||
se = open('/dev/null', 'w')
|
||||
os.dup2(se.fileno(), sys.stderr.fileno())
|
||||
os.dup2(se.fileno(), sys.stdout.fileno())
|
||||
rpm_spec = ts.parseSpec(spec_path)
|
||||
|
@ -433,7 +433,7 @@ def logOutput(fds, start=0, timeout=0, print_to_stdout=False):
|
|||
events = epoll.poll(1)
|
||||
for fileno, event in events:
|
||||
if event & select.EPOLLIN:
|
||||
#print(fileno, event)
|
||||
#print (fileno, event)
|
||||
if fileno == fds[0].fileno():
|
||||
r = fds[0].read()
|
||||
output += r
|
||||
|
@ -594,6 +594,10 @@ def upload_files(models, min_size, path=None, remove_files=True, upload_all=Fals
|
|||
log.debug(_('Removing file %s') % source)
|
||||
os.remove(source)
|
||||
|
||||
# We used to have 'removed_sources' section which found no use in real life
|
||||
if 'removed_sources' in yaml_data:
|
||||
del yaml_data['removed_sources']
|
||||
yaml_file_changed = True
|
||||
|
||||
if yaml_file_changed:
|
||||
log.debug(_('Writing the new .abf.yml file...'))
|
||||
|
|
Loading…
Add table
Reference in a new issue