Changeset 47121 in webkit


Ignore:
Timestamp:
Aug 12, 2009 10:18:44 AM (15 years ago)
Author:
Adam Roben
Message:

Don't try to seek to the end of stdin on Cygwin

Doing so seems to always cause an exception (for unknown reasons).

Fixes <http://webkit.org/b/28159> create-bug throws an exception in
Cygwin

Reviewed by Dave Kilzer.

  • Scripts/bugzilla-tool:

(CreateBug.prompt_for_bug_title_and_comments): Ignore IOErrors
generated by calling sys.stdin.seek, since these seem to be generated
for no good reason on Cygwin.

Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r47120 r47121  
     12009-08-12  Adam Roben  <aroben@apple.com>
     2
     3        Don't try to seek to the end of stdin on Cygwin
     4
     5        Doing so seems to always cause an exception (for unknown reasons).
     6
     7        Fixes <http://webkit.org/b/28159> create-bug throws an exception in
     8        Cygwin
     9
     10        Reviewed by Dave Kilzer.
     11
     12        * Scripts/bugzilla-tool:
     13        (CreateBug.prompt_for_bug_title_and_comments): Ignore IOErrors
     14        generated by calling sys.stdin.seek, since these seem to be generated
     15        for no good reason on Cygwin.
     16
    1172009-08-12  Adam Roben  <aroben@apple.com>
    218
  • trunk/WebKitTools/Scripts/bugzilla-tool

    r47111 r47121  
    555555        print "Bug comment (hit ^D on blank line to end):"
    556556        lines = sys.stdin.readlines()
    557         sys.stdin.seek(0, os.SEEK_END)
     557        try:
     558            sys.stdin.seek(0, os.SEEK_END)
     559        except IOError:
     560            # Cygwin raises an Illegal Seek (errno 29) exception when the above
     561            # seek() call is made. Ignoring it seems to cause no harm.
     562            # FIXME: Figure out a way to get avoid the exception in the first
     563            # place.
     564            pass
     565        else:
     566            raise
    558567        comment_text = ''.join(lines)
    559568        return (bug_title, comment_text)
Note: See TracChangeset for help on using the changeset viewer.