Fix for ticket:135.
authorBrandon King <kingb@caltech.edu>
Thu, 14 May 2009 21:42:56 +0000 (21:42 +0000)
committerBrandon King <kingb@caltech.edu>
Thu, 14 May 2009 21:42:56 +0000 (21:42 +0000)
 * It is apparently helpful to close the connection with the ftp server upon printing.

samplebc/samples/views.py

index 8069f7d8eb805d6085e86dd3963a8c1d45b9f7e0..2d3825c0e4afa493fb52f59d14483fdc430ab482 100644 (file)
@@ -36,6 +36,7 @@ def print_zpl(zpl_text):
     ftp = ftplib.FTP(host='131.215.54.194', user='blank', passwd='')
     ftp.login()
     ftp.storlines("STOR printme.txt", StringIO.StringIO(zpl_text))
+    ftp.quit()
 
 
 def __center_line(line, width):