Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't fail on Windows

  • Loading branch information...
commit 87366fd8da3c865a03aa20343fe4613f1f38d7f2 1 parent c5af83c
Blixt authored
Showing with 12 additions and 4 deletions.
  1. +6 −2 cli.py
  2. +6 −2 region.py
View
8 cli.py
@@ -11,8 +11,12 @@
import starbound.btreedb4
import starbound.sbon
-# Don't break on pipe signal.
-signal.signal(signal.SIGPIPE, signal.SIG_DFL)
+try:
+ # Don't break on pipe signal.
+ signal.signal(signal.SIGPIPE, signal.SIG_DFL)
+except:
+ # Probably a Windows machine.
+ pass
def print_leaves(file, block_number=None, depth=0, prefix=None):
"""Prints out the full B-tree of accessible leaves"""
View
8 region.py
@@ -6,8 +6,12 @@
import starbound
-# Don't break on pipe signal.
-signal.signal(signal.SIGPIPE, signal.SIG_DFL)
+try:
+ # Don't break on pipe signal.
+ signal.signal(signal.SIGPIPE, signal.SIG_DFL)
+except:
+ # Probably a Windows machine.
+ pass
def main():
p = optparse.OptionParser()
Please sign in to comment.
Something went wrong with that request. Please try again.