Repository: oppia/oppia

Issue:
Fix flaky linter check when running on Travis
We occasionally get this error when running the linter:

```
----------------------------------------
Traceback (most recent call last):
  File "scripts/pre_commit_linter.py", line 582, in <module>
    main()
  File "scripts/pre_commit_linter.py", line 573, in main
    linter_messages = _pre_commit_linter(all_files)
  File "scripts/pre_commit_linter.py", line 447, in _pre_commit_linter
    summary_messages.append(js_result.get(block=False))
  File "/opt/python/2.7.13/lib/python2.7/multiprocessing/queues.py", line 134, in get
    raise Empty
Queue.Empty
```

The error goes away on re-run, but is irritating. It would be good to figure out why this is happening and fix it.

/cc @tjiang11 


Discussion:
@seanlip hmm, don't remember encountering this issue. Is it reproducible or does it just pops up randomly?
It pops up randomly. Possibly some kind of race condition...
@seanlip I am interested in working, can I work on this issue?
Hi @Dragneel7 -- sure, please go ahead! Please follow [these instructions](https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#setting-things-up) to get started first.
@seanlip should I do the starter projects before working on this issue?

Hm, I think it depends on how much experience you have. If you're fairly new to github and the technologies Oppia uses, I'd suggest doing so, since they have more instructions, but it's fine either way!

Btw, it would also be helpful if you could fill in the [contributor survey](https://goo.gl/forms/otv30JV3Ihv0dT3C3), since then we can direct you in the future to projects that match your interests/experience.

(Also, welcome to the project!)
@seanlip I am having trouble setting up the development server, I followed what the installation guide said, but I get this
![deepinscreenshot_20171127085006](https://user-images.githubusercontent.com/24193342/33249386-3230980c-d350-11e7-9427-2926bd852765.png)

the browser window shows "site cannot be reached" Can you please suggest what am I doing wrong?
Thanks.

Going to localhost:8181 should work, but you may need to give App Engine a little time to get started fully. The log looks OK to me.
I will try to get it running, thanks for the help.

@seanlip I am still unable to run oppia on the development server , and the logs remain the same.Can you suggest where I might be going wrong?
I am getting this "9106:9139:1129/110121.370223:ERROR:ssl_client_socket_impl.cc(1135)] handshake failed; returned -1, SSL error code 1, net_error -101"


I'm sorry, I don't know -- this is probably something to do with how your local machine is set up. The server should be serving from localhost:8181. Is anything using that port?
I don't think so, anyways I will try some more to get it running.
I was able to setup Oppia locally and will try to work on the issue.
Hi @Dragneel7, you also asked for working on part of #3826. I suggest you should work on one issue first. I have assigned you to that part. Do you want to work on this one instead?
I will start by working on the part of #3826 .
thanks @Dragneel7 

Resolving patch:
diff --git a/scripts/pre_commit_linter.py b/scripts/pre_commit_linter.py
--- a/scripts/pre_commit_linter.py
+++ b/scripts/pre_commit_linter.py
@@ -442,10 +442,8 @@ def _pre_commit_linter(all_files):
     print '\n'.join(js_messages)
     print '----------------------------------------'
     summary_messages = []
-    # Require block = False to prevent unnecessary waiting for the process
-    # output.
-    summary_messages.append(js_result.get(block=False))
-    summary_messages.append(py_result.get(block=False))
+    summary_messages.append(js_result.get())
+    summary_messages.append(py_result.get())
     print '\n'.join(summary_messages)
     print ''
     return summary_messages


Test patch: