Othernet-Project / conz

Library for writing command line programs
GNU General Public License v3.0
1 stars 1 forks source link

Depending on existence of signal.SIGPIPE breaks Windows compatibility #1

Open foxbunny opened 8 years ago

foxbunny commented 8 years ago
Traceback (most recent call last):
  File "C:\Python27\Scripts\metacheck-script.py", line 9, in <module>
    load_entry_point('outernet-metadata==0.8.post1', 'console_scripts', 'metache
ck')()
  File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 552, in l
oad_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 2672, in
load_entry_point
    return ep.load()
  File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 2345, in
load
    return self.resolve()
  File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 2351, in
resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "C:\Python27\lib\site-packages\outernet_metadata\validate.py", line 19, i
n <module>
    cn = conz.Console()
  File "C:\Python27\lib\site-packages\conz\console.py", line 57, in __init__
    self.register_signals()
  File "C:\Python27\lib\site-packages\conz\console.py", line 273, in register_si
gnals
    signal.signal(signal.SIGPIPE, self.onpipe)
AttributeError: 'module' object has no attribute 'SIGPIPE'
ben-en commented 8 years ago

Do we want to catch the exception and log a warning or should i find an alternative to signal.SIGPIPE for windows, if such a thing exists?

foxbunny commented 8 years ago

I think it's best to simply disable pipe-related features on unsupported platforms.