Giter VIP home page Giter VIP logo

Comments (4)

pallotron avatar pallotron commented on July 28, 2024

Hey sorry for the late response, I was off for the holidays. :-)

So you could use get_response_data and throw any exception in your implementation. The Exception will be caught and a ERR_UNDEFINED error will be returned to the client as you see here:

https://github.com/facebook/fbtftp/blob/master/fbtftp/base_handler.py#L145

That is supposing that returning ERR_UNDEFINED is ok for you.

from fbtftp.

pallotron avatar pallotron commented on July 28, 2024

One better way could be to define a new GetResponseDataException that carries a message string together with a TFTP error code constant as defined in https://github.com/facebook/fbtftp/blob/master/fbtftp/constants.py#L21

from fbtftp.

pallotron avatar pallotron commented on July 28, 2024

if you decide to go with the latter proposal we are more than happy to review your PR!!! :)

from fbtftp.

pallotron avatar pallotron commented on July 28, 2024

I am closing this "issue". Please feel free to reopen if you need more clarifications and as I already said feel free to send us a PR if you want to implement the last thing I suggested :)

from fbtftp.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.