#NEWLINE# def makeService( config ) : #NEWLINE# #INDENT# f = ftp . FTPFactory ( ) #NEWLINE# r = ftp . FTPRealm ( config [ 'root' ] ) #NEWLINE# p = portal . Portal ( r , config . get ( 'credCheckers' , [ ] ) ) #NEWLINE# f . tld = config [ 'root' ] #NEWLINE# f . userAnonymous = config [ 'userAnonymous' ] #NEWLINE# f . portal = p #NEWLINE# f . protocol = ftp . FTP #NEWLINE# try : #NEWLINE# #INDENT# portno = int ( p [ 'port' ] ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# portno = 2121 #NEWLINE# #UNINDENT# return internet . TCPServer ( portno , f )