plus

20

--- a/shared/helpers/common_helper.php
+++ b/shared/helpers/common_helper.php
@@ -32,15 +32,35 @@
  * 
  *
  * @access	public
- * @param	string	
+ * @param	string
  * @return	mixed
  */
 if ( ! function_exists('setting'))
 {
-	function setting($key)
+	function setting($key, $default = null)
 	{
 		$ci = &get_instance();
-		return 	$ci->settings->item($key);
+
+    	$sequences = explode('.', $key);
+
+		$key = array_shift($sequences);
+
+    	$tmp_result = $ci->settings->item($key);
+
+	    for ($i = 0, $total = count($sequences); $i < $total; )
+		{
+
+	        if (isset($tmp_result[$sequences[$i]]))
+			{
+	            $tmp_result = $tmp_result[$sequences[$i]];
+	            $i ++;
+	        } else {
+	            return $default;
+	        }
+
+	    }
+
+    	return $tmp_result;
 	}
 }
 
@@ -83,8 +103,8 @@ function update_cache($array, $fix = '')
 {
 	function array_to_cache($name, $array)
 	{
-		return '<?php if ( ! defined(\'IN_DILICMS\')) exit(\'No direct script access allowed\');' . PHP_EOL . 
-			   '$' . $name . '=' . var_export($array, TRUE) . ';'; 
+		return '<?php if ( ! defined(\'IN_DILICMS\')) exit(\'No direct script access allowed\');' . PHP_EOL .
+			   '$' . $name . '=' . var_export($array, TRUE) . ';';
 	}
 }
 
@@ -119,7 +139,7 @@ function backend_url($uri = '', $qs = '')
 	function plugin_url($plugin, $controller, $method = 'index', $qs = array())
 	{
 	    $ci = &get_instance();
-		if (false and $ci->config->item('index_page') === '') 
+		if (false and $ci->config->item('index_page') === '')
 	    {
 	        return backend_url("plugin/$name/$controller/$method", http_build_query($qs));
 	    }
@@ -133,4 +153,4 @@ function plugin_url($plugin, $controller, $method = 'index', $qs = array())
 // ------------------------------------------------------------------------
 
 /* End of file common_helper.php */
-/* Location: ./shared/heleprs/common_helper.php */
\ No newline at end of file
+/* Location: ./shared/heleprs/common_helper.php */
plus

4

--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -73,6 +73,7 @@
 #include <poll.h>
 #include <boost/scoped_array.hpp>
 
+#include <com/sun/star/uno/DeploymentException.hpp>
 #include <officecfg/Office/Common.hxx>
 
 using namespace vcl_sal;
@@ -191,9 +192,15 @@ bool SalDisplay::BestVisual( Display     *pDisplay,
     if( nVID && sal_GetVisualInfo( pDisplay, nVID, rVI ) )
         return rVI.visualid == nDefVID;
 
-    bool bUseOpenGL = officecfg::Office::Common::VCL::UseOpenGL::get();
-    if( bUseOpenGL && OpenGLHelper::GetVisualInfo( pDisplay, nScreen, rVI ) )
-        return rVI.visualid == nDefVID;
+    try {
+        bool bUseOpenGL = officecfg::Office::Common::VCL::UseOpenGL::get();
+        if( bUseOpenGL && OpenGLHelper::GetVisualInfo( pDisplay, nScreen, rVI ) )
+            return rVI.visualid == nDefVID;
+    }
+    catch (const css::uno::DeploymentException&)
+    {
+        // too early to try to access configmgr
+    }
 
     XVisualInfo aVI;
     aVI.screen = nScreen;
plus

23

--- a/src/api/app/models/update_notification_events.rb
+++ b/src/api/app/models/update_notification_events.rb
@@ -30,6 +30,8 @@ def perform
     # pick first admin so we can see all projects - as this function is called from delayed job
     User.current ||= User.get_default_admin
 
+    limit_reached=false
+    begin
     semaphore.synchronize do
       nr = BackendInfo.lastnotification_nr
       # 0 is a bad start
@@ -46,11 +48,13 @@ def perform
         BackendInfo.lastnotification_nr = Integer(@last['next'])
         return
       end
+      limit_reached=(not @last['limit_reached'].blank?)
 
       Event::Base.transaction do
         create_events
       end
     end
+    end while limit_reached
 
   end
 end
plus

3

index 0000000..d1f3516
--- /dev/null
+++ b/anagrams/20141014-david-paul/src/test/java/AnagramsTest.java
@@ -0,0 +1,22 @@
+import org.junit.Test;
+
+import static org.fest.assertions.api.Assertions.assertThat;
+
+/**
+ * Write a program to generate all potential
+ * anagrams of an input string.
+ * <p/>
+ * For example, the potential anagrams of "biro" are
+ * <p/>
+ * biro bior brio broi boir bori
+ * ibro ibor irbo irob iobr iorb
+ * rbio rboi ribo riob roib robi
+ * obir obri oibr oirb orbi orib
+ */
+public class AnagramsTest {
+
+    @Test
+    public void testUseFestItRocks() throws Exception {
+        assertThat(true).isEqualTo(true);
+    }
+}
plus

3

--- a/lib/indexesWordPress.py
+++ b/lib/indexesWordPress.py
@@ -52,7 +52,21 @@ def __init__(self, directory, verbose=False):
             '\n',
             '# The rise of bots, spammers, crack attacks and libwww-perl.\n',
             'RewriteCond %{HTTP_USER_AGENT} libwww-perl.*',
-            '\n', 'RewriteRule .* - [F,L]', '\n'
+            '\n', 'RewriteRule .* - [F,L]',
+            '\n', '# Query string Exploits.\n',
+            '\n', 'RewriteCond %{QUERY_STRING} ../    [NC,OR]',
+            '\n', 'RewriteCond %{QUERY_STRING} boot.ini [NC,OR]',
+            '\n', 'RewriteCond %{QUERY_STRING} tag=     [NC,OR]',
+            '\n', 'RewriteCond %{QUERY_STRING} ftp:     [NC,OR]',
+            '\n', 'RewriteCond %{QUERY_STRING} http:    [NC,OR]',
+            '\n', 'RewriteCond %{QUERY_STRING} https:   [NC,OR]',
+            '\n', 'RewriteCond %{QUERY_STRING} mosConfig [NC,OR]',
+            '\n', 'RewriteCond %{QUERY_STRING} ^.*([|]|(|)||\'|;|?|*).* [NC,OR]',
+            '\n', 'RewriteCond %{QUERY_STRING} ^.*(%22|%27|%3C|%3E|%5C|%7B|%7C).* [NC,OR]',
+            '\n', 'RewriteCond %{QUERY_STRING} ^.*(%0|%A|%B|%C|%D|%E|%F|127.0).* [NC,OR]',
+            '\n', 'RewriteCond %{QUERY_STRING} ^.*(globals|encode|config|loopback).* [NC,OR]',
+            '\n', 'RewriteCond %{QUERY_STRING} ^.*(request|select|insert|union|declare|drop).* [NC]',
+            '\n', 'RewriteRule ^(.*)$ - [F,L]'            
         ]
         self.mode_verbose = verbose
 
plus

3

--- a/bin/l10n_status.py
+++ b/bin/l10n_status.py
@@ -85,16 +85,21 @@ def display_summary(last_item, app, highlight):
         print '{0:>8}: {1}'.format(loc, format_bar(perc))
 
 
-def mark_movement(data):
+def mark_movement(data, space):
     """Adds ^ and v for up and down movement based on previous day"""
+    data = list(data)
     for i, day in enumerate(data):
         if i == 0:
             continue
 
-        if data[i-1] > data[i]:
-            data[i] = TERM.bold_red('v' + data[i])
-        elif data[i-1] < data[i]:
-            data[i] = TERM.bold_green('^' + data[i])
+        item = data[i]
+        prespace = ' ' * (space - len(str(item)) - 1)
+        if data[i-1] > item:
+            item = prespace + TERM.bold_red('v' + str(item))
+        elif data[i-1] < item:
+            item = prespace + TERM.bold_green('^' + str(item))
+
+        data[i] = item
 
     return data
 
@@ -132,18 +137,15 @@ def display_history(data, app, highlight):
         for loc in hlocales:
             values = []
             values.append(loc)
-            day_data = mark_movement([get_data(day['locales'][loc]) for day in data])
-            values.extend(day_data)
+            day_data = [get_data(day['locales'][loc]) for day in data]
+            values.extend(mark_movement(day_data, 6))
 
-            if values[-1] < 90:
+            if day_data[-1] < 90:
                 values.append('**')
             else:
                 values.append('')
 
-            if loc in highlight:
-                print TERM.bold_green(tmpl.format(*values))
-            else:
-                print tmpl.format(*values)
+            print tmpl.format(*values)
         print ''
 
     print 'Locales:'
@@ -164,8 +166,9 @@ def display_history(data, app, highlight):
 
 
 def main(argv):
-    parser = argparse.ArgumentParser(description=DESC, usage=USAGE,
-                                     epilog='Note: Install blessings for color.')
+    parser = argparse.ArgumentParser(
+        description=DESC, usage=USAGE,
+        epilog='Note: Install blessings for color.')
     parser.add_argument('--app',
                         help='Specify the app to show data for')
     parser.add_argument('--highlight', default=[],
plus

8

--- a/src/guiChatConsole.cpp
+++ b/src/guiChatConsole.cpp
@@ -442,12 +442,12 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
 			// the_game will open the pause menu
 			return true;
 		}
-		else if(event.KeyInput.Key == KEY_PRIOR)
+		else if(event.KeyInput.Key == KEY_PRIOR && event.KeyInput.Char == 0)
 		{
 			m_chat_backend->scrollPageUp();
 			return true;
 		}
-		else if(event.KeyInput.Key == KEY_NEXT)
+		else if(event.KeyInput.Key == KEY_NEXT && event.KeyInput.Char == 0)
 		{
 			m_chat_backend->scrollPageDown();
 			return true;
@@ -463,21 +463,21 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
 			}
 			return true;
 		}
-		else if(event.KeyInput.Key == KEY_UP)
+		else if(event.KeyInput.Key == KEY_UP && event.KeyInput.Char == 0)
 		{
 			// Up pressed
 			// Move back in history
 			m_chat_backend->getPrompt().historyPrev();
 			return true;
 		}
-		else if(event.KeyInput.Key == KEY_DOWN)
+		else if(event.KeyInput.Key == KEY_DOWN && event.KeyInput.Char == 0)
 		{
 			// Down pressed
 			// Move forward in history
 			m_chat_backend->getPrompt().historyNext();
 			return true;
 		}
-		else if(event.KeyInput.Key == KEY_LEFT)
+		else if(event.KeyInput.Key == KEY_LEFT && event.KeyInput.Char == 0)
 		{
 			// Left or Ctrl-Left pressed
 			// move character / word to the left
@@ -491,7 +491,7 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
 				scope);
 			return true;
 		}
-		else if(event.KeyInput.Key == KEY_RIGHT)
+		else if(event.KeyInput.Key == KEY_RIGHT && event.KeyInput.Char == 0)
 		{
 			// Right or Ctrl-Right pressed
 			// move character / word to the right
@@ -505,7 +505,7 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
 				scope);
 			return true;
 		}
-		else if(event.KeyInput.Key == KEY_HOME)
+		else if(event.KeyInput.Key == KEY_HOME && event.KeyInput.Char == 0)
 		{
 			// Home pressed
 			// move to beginning of line
@@ -515,7 +515,7 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
 				ChatPrompt::CURSOROP_SCOPE_LINE);
 			return true;
 		}
-		else if(event.KeyInput.Key == KEY_END)
+		else if(event.KeyInput.Key == KEY_END && event.KeyInput.Char == 0)
 		{
 			// End pressed
 			// move to end of line
plus

3

--- a/myClient/merges/android/src/views/PopupQueueScrollView.js
+++ b/myClient/merges/android/src/views/PopupQueueScrollView.js
@@ -32,6 +32,7 @@ define(function(require, exports, module) {
         _createPopup.call(this);
         _addListOfPlaylists.call(this);
         _addSlideDownBtn.call(this);
+        _addSlideDownCover.call(this);
         _createAddToPlaylistsBtn.call(this);
         _addTopPhrase.call(this);
 
@@ -264,6 +265,24 @@ define(function(require, exports, module) {
 
     }
 
+    function _addSlideDownCover (){
+
+        this.slideDownCover = new Surface({
+            size: [0.12*this.options.size[1], 0.0935*this.options.size[1]],
+            properties: {
+                backgroundColor: 'yellow',
+            }
+        });
+
+        this.slideDownCoverModifier = new StateModifier({
+            origin: [1, 1],
+            align: [1, 1],
+            transform: Transform.translate(-0.065*this.options.size[0], -0.235*this.options.size[1], 2.2)
+        });
+
+        this.mainNode.add(this.slideDownCoverModifier).add(this.slideDownCover);
+
+    }
 
     function _createAddToPlaylistsBtn (){
 
plus

6

--- a/gosu-core/src/main/java/gw/internal/gosu/parser/TypeLoaderAccess.java
+++ b/gosu-core/src/main/java/gw/internal/gosu/parser/TypeLoaderAccess.java
@@ -384,19 +384,21 @@ public IType getByRelativeName(String relativeName, ITypeUsesMap typeUses) throw
   public IType getTypeByRelativeNameIfValid_NoGenerics(String relativeName, ITypeUsesMap typeUses)
   {
     IType type;
-    IType defaultType = getDefaultType(relativeName);
-    if( defaultType != null )
-    {
-      return defaultType;
-    }
     if( typeUses != null )
     {
       // Then if we have a type uses map and we are resolving let it try
       type = typeUses.resolveType(relativeName);
-    } else {
-      // Else just ask for it by full name
+    }
+    else
+    {
+      // ask for it by full name
       type = getByFullNameIfValid(relativeName);
     }
+
+    if( type == null )
+    {
+      type = getDefaultType(relativeName);
+    }
     return type;
   }
 
plus

6

--- a/tests/functional/lib/issue-list.js
+++ b/tests/functional/lib/issue-list.js
@@ -67,25 +67,22 @@ define([
         .then(function (isDisplayed) {
           assert.equal(isDisplayed, true, 'IssueList container is visible.');
         })
-        .sleep(1000)
         .end()
-        .findByCssSelector('.js-pagination-previous').getAttribute('class')
+        .findByCssSelector('.js-pagination-previous.is-disabled').getAttribute('class')
         .then(function (className) {
           assert.include(className, 'is-disabled', 'First page load should have disabled prev button');
         })
         .end()
         .findByCssSelector('.js-pagination-next').click()
-        .sleep(500)
         .end()
-        .findByCssSelector('.js-pagination-previous').getAttribute('class')
+        .findByCssSelector('.js-pagination-previous:not(.is-disabled)').getAttribute('class')
         .then(function (className) {
           assert.notInclude(className, 'is-disabled', 'Clicking next enables prev button');
         })
         .end()
         .findByCssSelector('.js-pagination-previous').click()
-        .sleep(500)
         .end()
-        .findByCssSelector('.js-pagination-previous').getAttribute('class')
+        .findByCssSelector('.js-pagination-previous.is-disabled').getAttribute('class')
         .then(function (className) {
           assert.include(className, 'is-disabled', 'Going back from first next click should have disabled prev button');
         })
plus

6

--- a/iRODS/lib/core/src/irods_environment_properties.cpp
+++ b/iRODS/lib/core/src/irods_environment_properties.cpp
@@ -263,11 +263,16 @@ namespace irods {
             }
 
             std::vector< std::string > toks;
+            try {
             boost::split(
                 toks,
                 line,
                 boost::is_any_of( "\t " ),
                 boost::token_compress_on );
+            } catch ( boost::exception& e ) {
+                rodsLog( LOG_ERROR, "boost::split failed on line [%s]", line.c_str() );
+                continue;
+            }
             if( toks.size() != 2 ||
                 toks[0].empty()  ||
                 toks[1].empty()) {
plus

658

--- a/salt/states/file.py
+++ b/salt/states/file.py
@@ -1293,7 +1293,8 @@ def managed(name,
 
     try:
         if __opts__['test']:
-            ret['result'], ret['comment'] = __salt__['file.check_managed'](
+            ret['result'] = None
+            ret['changes'] = __salt__['file.check_managed_changes'](
                 name,
                 source,
                 source_hash,
@@ -1307,6 +1308,12 @@ def managed(name,
                 contents,
                 **kwargs
             )
+
+            if ret['changes']:
+                ret['comment'] = 'The file {0} is set to be changed'.format(name)
+            else:
+                ret['comment'] = 'The file {0} is in the correct state'.format(name)
+
             return ret
 
         # If the source is a list then find which file exists
plus

5

--- a/src/apps/common/PortfolioItemsGridBoardApp.js
+++ b/src/apps/common/PortfolioItemsGridBoardApp.js
@@ -55,6 +55,7 @@
             return _.merge(this.callParent(arguments), {
                 boardFieldDefaults: (this.getSetting('fields') || '').split(','),
                 gridFieldBlackList: this.getContext().isFeatureEnabled('S74502_PI_DEPENDENCIES_ON_EDP') ? [] : ['PredecessorsAndSuccessors'],
+                boardFieldBlackList: ['Predecessors', 'Successors'].concat(this.getContext().isFeatureEnabled('S74502_PI_DEPENDENCIES_ON_EDP') ? [] : ['PredecessorsAndSuccessors']),
                 margin: '3 9 14 0'
             });
         },
plus

3

--- a/files/private-chef-cookbooks/private-chef/recipes/add_ons_remote.rb
+++ b/files/private-chef-cookbooks/private-chef/recipes/add_ons_remote.rb
@@ -26,10 +26,12 @@
 
   major_version = node['platform_version'].split('.').first
 
+  gpg_key_path = File.join(node['private_chef']['install_path'], "/embedded/keys/chef.gpg.key")
+
   yum_repository 'chef-stable' do
     description 'Chef Stable Repo'
     baseurl "https://packagecloud.io/chef/stable/el/#{major_version}/$basearch"
-    gpgkey 'https://downloads.getchef.com/chef.gpg.key'
+    gpgkey "file://#{gpg_key_path}"
     sslverify true
     sslcacert '/etc/pki/tls/certs/ca-bundle.crt'
     gpgcheck true
plus

56

--- a/src/js/ripple/remote.js
+++ b/src/js/ripple/remote.js
@@ -1217,6 +1217,7 @@ Remote.prototype.requestTx = function(hash, callback) {
  *   @param {String} marker - start position in response paging
  * @param [Function] callback
  * @return {Request}
+ * @throws {Error} if a marker is provided, but no ledger_index or ledger_hash
  */
 Remote.accountRequest = function(type, options, callback) {
   var account, ledger, peer, limit, marker;
plus

3

--- a/files/private-chef-cookbooks/private-chef/recipes/add_ons_remote.rb
+++ b/files/private-chef-cookbooks/private-chef/recipes/add_ons_remote.rb
@@ -26,10 +26,12 @@
 
   major_version = node['platform_version'].split('.').first
 
+  gpg_key_path = File.join(node['private_chef']['install_path'], "/embedded/keys/chef.gpg.key")
+
   yum_repository 'chef-stable' do
     description 'Chef Stable Repo'
     baseurl "https://packagecloud.io/chef/stable/el/#{major_version}/$basearch"
-    gpgkey 'https://downloads.getchef.com/chef.gpg.key'
+    gpgkey "file://#{gpg_key_path}"
     sslverify true
     sslcacert '/etc/pki/tls/certs/ca-bundle.crt'
     gpgcheck true
plus

15

--- a/plugin/compiler.js
+++ b/plugin/compiler.js
@@ -88,11 +88,23 @@ _.extend(Compiler.prototype, {
     return buffer;
   },
 
+  visitTextOnlyBlock: function(block) {
+    var self = this;
+    var parts = _(block.nodes).pluck('val');
+    parts = self._interposeEOL(parts);
+    return parts.reduce(function(a, b) { return a + b}, '');
+  },
+
   visitNode: function(node, elseNode, level) {
     var self = this;
     var attrs = self.visitAttributes(node.attrs);
-    var content = (node.code) ? self.visitCode(node.code) :
-                                             self.visitBlock(node.block, level);
+    if (node.code)
+      var content = self.visitCode(node.code);
+    else if (node.textOnly)
+      var content = self.visitTextOnlyBlock(node.block);
+    else
+      var content = self.visitBlock(node.block, level);
+
     var elseContent = self.visitBlock(elseNode && elseNode.block, level);
 
     if (level === 1)
plus

3

index 0000000..44d8b2c
--- /dev/null
+++ b/GAE/src/org/waterforpeople/mapping/app/web/rest/security/CustomVoter.java
@@ -0,0 +1,50 @@
+/*
+ *  Copyright (C) 2014 Stichting Akvo (Akvo Foundation)
+ *
+ *  This file is part of Akvo FLOW.
+ *
+ *  Akvo FLOW is free software: you can redistribute it and modify it under the terms of
+ *  the GNU Affero General Public License (AGPL) as published by the Free Software Foundation,
+ *  either version 3 of the License or any later version.
+ *
+ *  Akvo FLOW is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ *  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU Affero General Public License included below for more details.
+ *
+ *  The full license text can also be seen at <http://www.gnu.org/licenses/agpl.html>.
+ */
+
+package org.waterforpeople.mapping.app.web.rest.security;
+
+import java.util.Collection;
+import java.util.logging.Logger;
+
+import org.springframework.security.access.AccessDecisionVoter;
+import org.springframework.security.access.ConfigAttribute;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.web.FilterInvocation;
+
+public class CustomVoter implements AccessDecisionVoter<Object> {
+
+    private static final Logger log = Logger.getLogger(CustomVoter.class.getName());
+
+    @Override
+    public boolean supports(ConfigAttribute attribute) {
+        return true;
+    }
+
+    @Override
+    public boolean supports(Class<?> clazz) {
+        return FilterInvocation.class.isAssignableFrom(clazz);
+    }
+
+    @Override
+    public int vote(Authentication authentication, Object object,
+            Collection<ConfigAttribute> attributes) {
+
+        log.info(object.toString() + " - CustomVoter - voting: "
+                + AccessDecisionVoter.ACCESS_ABSTAIN);
+
+        return AccessDecisionVoter.ACCESS_ABSTAIN;
+    }
+}
plus

6

--- a/app/tests/spec/views/confirm.js
+++ b/app/tests/spec/views/confirm.js
@@ -128,12 +128,15 @@ function (chai, sinon, p, Session, AuthErrors, Metrics, FxaClient,
           });
       });
 
-      it('notifies the broker of afterSignUpConfirmationPoll after the account is confirmed', function (done) {
-        sinon.stub(broker, 'afterSignUpConfirmationPoll', function (data) {
+      it('notifies the broker after the account is confirmed', function (done) {
+        sinon.stub(broker, 'beforeSignUpConfirmationPoll', function () {
+          return p();
+        });
+        sinon.stub(broker, 'afterSignUpConfirmationPoll', function () {
           TestHelpers.wrapAssertion(function () {
             assert.isTrue(user.setAccount.calledWith(account));
             assert.isTrue(account.get('verified'));
-            assert.equal(data, accountData);
+            assert.isTrue(broker.beforeSignUpConfirmationPoll.calledWith(accountData));
             assert.isTrue(TestHelpers.isEventLogged(
                     metrics, 'confirm.verification.success'));
           }, done);
plus

3180

--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -434,6 +434,19 @@ def check_access_usr_local
   end
 end
 
+def check_access_site_packages
+  if Language::Python.homebrew_site_packages.exist? && !Language::Python.homebrew_site_packages.writable_real?
+    <<-EOS.undent
+      #{Language::Python.homebrew_site_packages} isn't writable.
+      This can happen if you "sudo pip install" software that isn't managed
+      by Homebrew. If you install a formula with Python modules, the install
+      will fail during the link step.
+
+      You should probably `chown` #{Language::Python.homebrew_site_packages}
+    EOS
+  end
+end
+
 def check_access_logs
   if HOMEBREW_LOGS.exist? and not HOMEBREW_LOGS.writable_real?
     <<-EOS.undent
@@ -1152,7 +1165,7 @@ def check_for_old_env_vars
   def check_for_pth_support
     homebrew_site_packages = Language::Python.homebrew_site_packages
     return unless homebrew_site_packages.directory?
-    return if Language::Python.reads_brewed_pth_files? "python"
+    return if Language::Python.reads_brewed_pth_files?("python") != false
     return unless Language::Python.in_sys_path?("python", homebrew_site_packages)
     user_site_packages = Language::Python.user_site_packages "python"
     <<-EOS.undent