def _uploadFile(self,directory,fn,dentry,db,service):
<EOL>if fn not in db:<EOL><INDENT>print("<STR_LIT>"%(fn))<EOL><DEDENT>else:<EOL><INDENT>if db[fn]['<STR_LIT>'][service]['<STR_LIT:status>']==self.ST_UPTODATE:<EOL><INDENT>if not dentry['<STR_LIT:status>']==self.ST_MODIFIED:<EOL><INDENT>logger.info("<STR_LIT>"%(fn,service))<EOL>return False<EOL><DEDENT><DEDENT>sobj=self.sman.GetServiceObj(service)<EOL>if (not sobj):<EOL><INDENT>print("<STR_LIT>"%(fn,service))<EOL>return<EOL><DEDENT>if sobj.Upload(directory,fn):<EOL><INDENT>db[fn]['<STR_LIT>']=dentry['<STR_LIT>']<EOL>db[fn]['<STR_LIT>']=self._hashfile(os.path.join(directory,fn))<EOL>db[fn]['<STR_LIT>'][service]['<STR_LIT:status>']=self.ST_UPTODATE<EOL>logger.debug('<STR_LIT>'%(fn,sobj.GetName()))<EOL>return True<EOL><DEDENT>else:<EOL><INDENT>logger.error('<STR_LIT>'%(fn,sobj.GetName()))<EOL>return False<EOL><DEDENT><DEDENT>return False<EOL>
Uploads file and changes status to 'S'. Looks
        up service name with service string