diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 383b3533390..7eb5d9aef31 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2019-05-04  Raul Tambre  <raul@tambre.ee>
+
+	* python/lib/gdb/prompt.py (_ExtendedPrompt)
+	<before_prompt_hook, get_show_string>: Fix incorrect use of 'is'
+	operator for comparison.
+
 2019-05-04  Tom Tromey  <tom@tromey.com>
 
 	* psymtab.c (psymbol_name_matches, match_partial_symbol)
diff --git a/gdb/python/lib/gdb/command/prompt.py b/gdb/python/lib/gdb/command/prompt.py
index 3d662a7d3f1..04b9e49c229 100644
--- a/gdb/python/lib/gdb/command/prompt.py
+++ b/gdb/python/lib/gdb/command/prompt.py
@@ -45,7 +45,7 @@ The currently defined substitutions are:
         self.hook_set = False
 
     def get_show_string (self, pvalue):
-        if self.value is not '':
+        if self.value:
            return "The extended prompt is: " + self.value
         else:
            return "The extended prompt is not set."
@@ -57,7 +57,7 @@ The currently defined substitutions are:
         return ""
 
     def before_prompt_hook(self, current):
-        if self.value is not '':
+        if self.value:
             return gdb.prompt.substitute_prompt(self.value)
         else:
             return None