Description: Fix string exceptions 
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=585295
Forwarded: not-needed
Author: Matthias Klose <doko@debian.org>


Patch that avoid string exceptions, Closes: #585295
--- a/gp_java.py
+++ b/gp_java.py
@@ -120,7 +120,7 @@
         command = [GnuplotOpts.gnuplot_command]
         if persist:
             if not test_persist():
-                raise ('-persist does not seem to be supported '
+                raise RuntimeError, ('-persist does not seem to be supported '
                        'by your version of gnuplot!')
             command.append('-persist')
 
--- a/gp_unix.py
+++ b/gp_unix.py
@@ -184,7 +184,7 @@
             persist = GnuplotOpts.prefer_persist
         if persist:
             if not test_persist():
-                raise ('-persist does not seem to be supported '
+                raise RuntimeError, ('-persist does not seem to be supported '
                        'by your version of gnuplot!')
             self.gnuplot = popen('%s -persist' % GnuplotOpts.gnuplot_command,
                                  'w')
--- a/_Gnuplot.py
+++ b/_Gnuplot.py
@@ -449,7 +449,7 @@
             try:
                 type = self.optiontypes[k]
             except KeyError:
-                raise 'option %s is not supported' % (k,)
+                raise KeyError, 'option %s is not supported' % (k,)
             getattr(self, 'set_%s' % type)(k, v)
 
     def xlabel(self, s=None, offset=None, font=None):
--- a/gp_macosx.py
+++ b/gp_macosx.py
@@ -118,7 +118,7 @@
             persist = GnuplotOpts.prefer_persist
         if persist:
             if not test_persist():
-                raise ('-persist does not seem to be supported '
+                raise RuntimeError, ('-persist does not seem to be supported '
                        'by your version of gnuplot!')
             self.gnuplot = popen('%s -persist' % GnuplotOpts.gnuplot_command,
                                  'w')
