File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -999,10 +999,15 @@ def __str__(self): return self.err
999999
10001000def _data_dump_only (processOptions ):
10011001 '''Returns True if we're dumping a script, NOT actually running gnuplot'''
1002+ def is_gp ():
1003+ h = processOptions .get ('hardcopy' )
1004+ return \
1005+ type (h ) is str and \
1006+ re .match (".*\.gp$" , h )
10021007 return \
10031008 processOptions .get ('dump' ) or \
10041009 processOptions .get ('terminal' ) == 'gp' or \
1005- re . match ( ".*\.gp$" , processOptions . get ( 'hardcopy' , '' ) )
1010+ is_gp ( )
10061011
10071012def split_dict (d , * keysets ):
10081013 r'''Given a dict and some sets of keys, split into sub-dicts with keys
@@ -1065,7 +1070,7 @@ def massageProcessOptionsAndGetCmds(processOptions):
10651070
10661071 # handle 'hardcopy'. This simply ties in to 'output' and 'terminal', handled
10671072 # later
1068- if 'hardcopy' in processOptions :
1073+ if processOptions . get ( 'hardcopy' ) is not None :
10691074 # 'hardcopy' is simply a shorthand for 'terminal' and 'output', so they
10701075 # can't exist together
10711076 if 'terminal' in processOptions or 'output' in processOptions :
You can’t perform that action at this time.
0 commit comments