Problem: Apple School Manager (ASM) throws (cosmetic) error

Problem

Apple School Manager (ASM) throws (cosmetic) error at the end of upload.

Environment (optional)

UCS@school
Apple School Manager (ASM)

Solution

At the end of the file upload we check the file by executing a stat on the file. Apple seems to move this file very fast so the stat fails.
We track this problem in Bug 54553.

Actual you can fix the problem by editing

/usr/lib/pymodules/python2.7/univention/asm/network/sftp_upload.py

Change this:

def upload(self, filename, remote_folder='/'):
                remote_filename = os.path.join(remote_folder, 'archive.zip')
                self.sftpClient.put(filename, remote_filename)

to this:

def upload(self, filename, remote_folder='/'):
                remote_filename = os.path.join(remote_folder, 'archive.zip')
                ### patch Bug54553
                #self.sftpClient.put(filename, remote_filename)
                apple_supports_stat_call = False
                self.sftpClient.put(filename, remote_filename, confirm=apple_supports_stat_call)

Watch the bug comments if the correction is published and the manual change is not necessary anymore.

This topic was automatically closed after 24 hours. New replies are no longer allowed.

Mastodon