--- a/src/mediaserver/cdplugins/uprcl/uprclsearch.py
+++ b/src/mediaserver/cdplugins/uprcl/uprclsearch.py
@@ -13,6 +13,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 from __future__ import print_function
+
+import sys
+PY3 = sys.version > '3'
 
 import re
 from recoll import recoll