Runtime Error in CUP (CVE-2015-1158) python exploit

M trying to execute following exploit against the vulnerable installation of cups however upon compiling m getting following error

root@kali:~./ -a -b 631 -c /tmp/

[*] locate available printer Traceback (most recent call last):   File 
"./", line 524, in <module>
    main()   File "./", line 504, in main
    printer = locatePrinters(rhost,rport)    File "./", line 
  147, in locatePrinters
    return printer UnboundLocalError: local variable 'printer' referenced 
   before assignment

Can somebody please guide me in direction from where I can trouble shoot this error via research