1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
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')
|