Skip to content
This repository has been archived by the owner on Jul 3, 2018. It is now read-only.

Commit

Permalink
Bug 1293534: Fix .ycm_extra_conf after bug 1195748. r=gps
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: HwNnOUThxev
  • Loading branch information
emilio committed Aug 9, 2016
1 parent 569564c commit 4a97547
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .ycm_extra_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
def FlagsForFile(filename):
mach = mach_module.get_mach()
out = StringIO()

# Mach calls sys.stdout.fileno(), so we need to fake it when capturing it.
# Returning an invalid file descriptor does the trick.
out.fileno = lambda: -1
out.encoding = None
mach.run(['compileflags', filename], stdout=out, stderr=out)

Expand Down

0 comments on commit 4a97547

Please sign in to comment.