Giter Site home page Giter Site logo

Comments (7)

th3-z avatar th3-z commented on June 17, 2024 1

Thanks, I'm aware of this issue, it only happens on Linux. I think there're a few places where ctrl + c isn't handled correctly if at all. I'll have a look at it soon.
If you wait a couple of seconds then ctrl + c again it should terminate.

from kf2-magicked-admin.

n0x-io avatar n0x-io commented on June 17, 2024

Well Thank you! It's not that big of a deal. As I said if you run it withing a Screen Session I just quit the bot and then terminate the screen-session which works very nice. So no need to hurry ;)

from kf2-magicked-admin.

th3-z avatar th3-z commented on June 17, 2024

This is solved, however now an Exception appears when using ctrl+c on Linux that I don't know how to handle.

from kf2-magicked-admin.

n0x-io avatar n0x-io commented on June 17, 2024

Thank you for looking into it! I'll test it when I get home.

from kf2-magicked-admin.

n0x-io avatar n0x-io commented on June 17, 2024

So... I took a look at the problem with the exception when exiting the program from the commandline.

I think it would be better to put a try/except block around "sys.exit()" because the exception seems to be a problem with how the termination with "sys.exit()" works.

I tried changing the code to

    try:
        sys.exit(0)
    except SystemExit:
        os._exit(0)

which should catch the exception.
Sorry if this is all wrong or bullshit. I'm very new to python and really should start looking into it more...

from kf2-magicked-admin.

th3-z avatar th3-z commented on June 17, 2024

Yeah, I think that would solve the issue. However I've used sys.exit() in quite a few places and I don't really want this block everywhere. Maybe a termination function in main.py that does all the clean-up and this try-catch would be ideal.

from kf2-magicked-admin.

th3-z avatar th3-z commented on June 17, 2024

solved

from kf2-magicked-admin.

Related Issues (20)

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.