You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/02/16 23:06:46 UTC

[GitHub] [cassandra] yukim opened a new pull request #448: Check if webbrowser._tryorder is not None for python 3

yukim opened a new pull request #448: Check if webbrowser._tryorder is not None for python 3
URL: https://github.com/apache/cassandra/pull/448
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] dineshjoshi commented on a change in pull request #448: Check if webbrowser._tryorder is not None for python 3

Posted by GitBox <gi...@apache.org>.
dineshjoshi commented on a change in pull request #448: Check if webbrowser._tryorder is not None for python 3
URL: https://github.com/apache/cassandra/pull/448#discussion_r379948624
 
 

 ##########
 File path: bin/cqlsh.py
 ##########
 @@ -96,7 +96,7 @@
 # >>> webbrowser._tryorder
 # >>> webbrowser._browser
 #
-if len(webbrowser._tryorder) == 0:
+if webbrowser._tryorder is None or len(webbrowser._tryorder) == 0:
 
 Review comment:
   Can you just call `webbrowser.get()` and leave the rest of the code as-is? This will initialize the `_tryorder` variable.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] yukim commented on a change in pull request #448: Check if webbrowser._tryorder is not None for python 3

Posted by GitBox <gi...@apache.org>.
yukim commented on a change in pull request #448: Check if webbrowser._tryorder is not None for python 3
URL: https://github.com/apache/cassandra/pull/448#discussion_r403823399
 
 

 ##########
 File path: bin/cqlsh.py
 ##########
 @@ -96,7 +96,7 @@
 # >>> webbrowser._tryorder
 # >>> webbrowser._browser
 #
-if len(webbrowser._tryorder) == 0:
+if webbrowser._tryorder is None or len(webbrowser._tryorder) == 0:
 
 Review comment:
   I tried `webbroser.get()` and ran in docker container, and I hit the error mentioned. So I think it is safer to check if it is `None`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] nastra commented on a change in pull request #448: Check if webbrowser._tryorder is not None for python 3

Posted by GitBox <gi...@apache.org>.
nastra commented on a change in pull request #448: Check if webbrowser._tryorder is not None for python 3
URL: https://github.com/apache/cassandra/pull/448#discussion_r401740087
 
 

 ##########
 File path: bin/cqlsh.py
 ##########
 @@ -96,7 +96,7 @@
 # >>> webbrowser._tryorder
 # >>> webbrowser._browser
 #
-if len(webbrowser._tryorder) == 0:
+if webbrowser._tryorder is None or len(webbrowser._tryorder) == 0:
 
 Review comment:
   in a Docker testing environment it's likely that no default browser is installed and so you could end up in https://github.com/python/cpython/blob/3.7/Lib/webbrowser.py#L65, so I'm +1 with the fix here

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org