Skip to content

Commit

Permalink
should work now
Browse files Browse the repository at this point in the history
  • Loading branch information
bwnance committed Nov 7, 2023
1 parent 3d58133 commit 3534cc6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions klippy/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
# Low-level Unix commands
######################################################################


# Return the SIGINT interrupt handler back to the OS default
def fix_sigint():
signal.signal(signal.SIGINT, signal.SIG_DFL)


fix_sigint()


# Set a file-descriptor as non-blocking
def set_nonblock(fd):
fcntl.fcntl(
Expand Down Expand Up @@ -242,6 +244,8 @@ def get_git_version(from_file=True):
retcode = process.wait()
if retcode == 0:
git_info["version"] = str(ver.strip().decode())
if from_file:
git_info["version"] = get_version_from_file(klippy_src)
process = subprocess.Popen(
prog_status, stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
Expand All @@ -260,7 +264,4 @@ def get_git_version(from_file=True):
logging.debug("Error getting git version: %s", err)
except:
logging.debug("Exception on run: %s", traceback.format_exc())

if from_file:
git_info["version"] = get_version_from_file(klippy_src)
return git_info

0 comments on commit 3534cc6

Please sign in to comment.