appnexus / pyrobuf

A Cython alternative to Google's Python Protobuf library
Other
556 stars 71 forks source link

FileExistsError is not defined on python2 #87

Closed vstax closed 6 years ago

vstax commented 6 years ago

Python 2.7.14, pyrobuf 0.6.3 (latest version from pip). Executing pyrobuf for the second time causes this:

$ pyrobuf test.proto
Traceback (most recent call last):
  File "/usr/bin/pyrobuf", line 11, in <module>
    load_entry_point('pyrobuf==0.6.3', 'console_scripts', 'pyrobuf')()
  File "/usr/lib64/python2.7/site-packages/pyrobuf/__main__.py", line 20, in main
    install=args.install, proto3=args.proto3)
  File "/usr/lib64/python2.7/site-packages/pyrobuf/__main__.py", line 53, in gen_message
    except FileExistsError:
NameError: global name 'FileExistsError' is not defined

This exception doesn't exist in python2/

tburmeister commented 6 years ago

Good catch, thanks.

tburmeister commented 6 years ago

Pushed version 0.6.4 with this fix.

vstax commented 6 years ago

The fix works, thanks.