|
0 |
-- a/component/ucsschool/ucs-school-umc-distribution/umc-distribution |
0 |
++ b/component/ucsschool/ucs-school-umc-distribution/umc-distribution |
Lines 329-341
def collectData( project, forced=False ):
|
Link Here
|
---|
|
329 |
target = os.path.join( targetdir, fn ) |
329 |
target = os.path.join( targetdir, fn ) |
330 |
if os.path.isfile( src ): |
330 |
if os.path.isfile( src ): |
331 |
try: |
331 |
try: |
332 |
shutil.copy( src, target ) |
332 |
shutil.move( src, target ) |
333 |
os.chown( target, |
333 |
os.chown( target, |
334 |
int(project['sender']['obj']['uidNumber']), |
334 |
int(project['sender']['obj']['uidNumber']), |
335 |
int(project['sender']['obj']['gidNumber']) ) |
335 |
int(project['sender']['obj']['gidNumber']) ) |
336 |
except Exception, ex: |
336 |
except Exception, ex: |
337 |
print 'Cannot copy %(src)s to %(dst)' % { 'src': src, 'dst': target } |
337 |
print 'Cannot move %(src)s to %(dst)' % { 'src': src, 'dst': target } |
338 |
debugmsg( ud.ADMIN, ud.ERROR, 'Cannot copy %(src)s to %(dst): %(msg)s' % { 'src': src, 'dst': target, 'msg': ex } ) |
338 |
debugmsg( ud.ADMIN, ud.ERROR, 'Cannot move %(src)s to %(dst): %(msg)s' % { 'src': src, 'dst': target, 'msg': ex } ) |
339 |
else: |
339 |
else: |
340 |
debugmsg( ud.ADMIN, ud.ERROR, '%(src)s does not exist.' % { 'src': src } ) |
340 |
debugmsg( ud.ADMIN, ud.ERROR, '%(src)s does not exist.' % { 'src': src } ) |
341 |
print '%(src)s does not exist.' % { 'src': src } |
341 |
print '%(src)s does not exist.' % { 'src': src } |