1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

'add' should add only files that exist

This commit is contained in:
Dr. Peter Poeml 2006-04-27 13:35:43 +00:00
parent fde1545c1d
commit c94b710d4a

4
osc.py
View File

@ -118,6 +118,10 @@ def main():
elif cmd == 'add': elif cmd == 'add':
filenames = sys.argv[2:] filenames = sys.argv[2:]
for filename in filenames:
if not os.path.exists(filename):
print "file '%s' does not exist" % filename
sys.exit(1)
for filename in filenames: for filename in filenames:
localmeta_addfile(filename) localmeta_addfile(filename)
print 'A ', filename print 'A ', filename